Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringIndexOutOfBoundsException when parsing empty string literal at the end of the input #1011

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

ErikP0
Copy link
Contributor

@ErikP0 ErikP0 commented Aug 25, 2020

This PR fixes a bug where an unfinished string literal at the end of the input throws a StringIndexOutOfBoundsException instead of a JsonDecodingException.

Json(JsonConfiguration.Stable).parse("\"")

throws StringIndexOutOfBoundsException. Similar to #704, this should be a generic decoding exception instead.

@sandwwraith sandwwraith self-requested a review August 27, 2020 14:51
@sandwwraith
Copy link
Member

Good catch, thank you

@sandwwraith sandwwraith merged commit cebdafc into Kotlin:dev Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants