netliomax25-code opened a new pull request, #2713: URL: https://github.com/apache/groovy/pull/2713
1. A value that starts with a digit or minus enters number decoding, but a malformed exponent or a lone sign/point such as `1e`, `1e+`, `1E`, or `-.` is only rejected when the collected token reaches `new BigDecimal(...)`. 2. The INDEX_OVERLAY and LAX overlay parsers already wrap that `NumberFormatException` in a `JsonException` (`NumberValue.bigDecimalValue`), but the default CHAR_BUFFER parser (`CharScanner.parseJsonNumber`) and the CHARACTER_SOURCE parser (`JsonParserUsingCharacterSource.decodeNumber`) let it propagate unwrapped, so an application guarding untrusted JSON with `catch (JsonException)` sees a raw `NumberFormatException` instead. 3. Wrapped the numeric construction at both sites so malformed numbers surface as `JsonException`, matching the overlay parsers. Added a regression test that checks all four parser types. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
