optLong vs getLong inconsistencies by rudrajyotib · Pull Request #783 · stleary/JSON-java

What problem does this code solve?
optLong() and getLong() may produce different results depending on whether leading zeros are present in the value being retrieved.

Risks
Low

Changes to the API?
Yes. stringToNumber() behavior was modified. This may change how the calling methods behave when the value contains leading zeros. It is not believed that this will be a common occurrence.

Will this require a new release?
No

Should the documentation be updated?
No

Does it break the unit tests?
No. New unit tests were added.

Was any code refactored in this commit?
Minimal refactoring of existing code was done (parameter name change, etc)

Review status
APPROVED

Starting 3-day comment window.