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

Fix #2334 #2337

Merged
merged 2 commits into from
Mar 6, 2023
Merged

Fix #2334 #2337

merged 2 commits into from
Mar 6, 2023

Conversation

MaicolAntali
Copy link
Contributor

@MaicolAntali MaicolAntali commented Mar 6, 2023

Purpose

Closes #2334

Description

This PR replaces the NumberFormatException with MalformedJsonException in the JsonReader#readEscapeCharacter() and also fixes the tests.

Checklist

  • New code follows the Google Java Style Guide
  • If necessary, new public API validates arguments, for example rejects null
  • New public API has Javadoc
    • Javadoc uses @since $next-version$
      ($next-version$ is a special placeholder which is automatically replaced during release)
  • If necessary, new unit tests have been added
    • Assertions in unit tests use Truth, see existing tests
    • No JUnit 3 features are used (such as extending class TestCase)
    • If this pull request fixes a bug, a new test was added for a situation which failed previously and is now fixed
  • mvn clean verify javadoc:jar passes without errors

This commit replaces the `NumberFormatException` with `MalformedJsonException` in the `JsonReader#readEscapeCharacter()` and also fixes the tests.
@eamonnmcmanus
Copy link
Member

Thanks!

@eamonnmcmanus eamonnmcmanus merged commit 85ebaf7 into google:master Mar 6, 2023
@MaicolAntali MaicolAntali deleted the fix_2334 branch March 6, 2023 17:17
eamonnmcmanus pushed a commit that referenced this pull request May 31, 2023
* Fix #2334

This commit replaces the `NumberFormatException` with `MalformedJsonException` in the `JsonReader#readEscapeCharacter()` and also fixes the tests.

* Removes white-space
tibor-universe pushed a commit to getuniverse/gson that referenced this pull request Sep 14, 2024
* Fix google#2334

This commit replaces the `NumberFormatException` with `MalformedJsonException` in the `JsonReader#readEscapeCharacter()` and also fixes the tests.

* Removes white-space
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.

Malformed Unicode escape sequence causes NumberFormatException instead of MalformedJsonException
2 participants