Skip to content

Fix #2334 - #2337

Merged
eamonnmcmanus merged 2 commits into
google:masterfrom
MaicolAntali:fix_2334
Mar 6, 2023
Merged

Fix #2334#2337
eamonnmcmanus merged 2 commits into
google:masterfrom
MaicolAntali:fix_2334

Conversation

@MaicolAntali

@MaicolAntali MaicolAntali commented Mar 6, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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