netliomax25-code opened a new pull request, #2619:
URL: https://github.com/apache/groovy/pull/2619

   1. JsonSlurper's default CHAR_BUFFER parser, the INDEX_OVERLAY and LAX 
overlay parsers, and the CHARACTER_SOURCE parser each pick a JSON integer's 
Java type with only an int-or-long check, so a value past Long.MAX_VALUE is 
never promoted to BigInteger.
   2. CHAR_BUFFER (CharScanner.parseJsonNumber) and the overlay parsers 
(NumberValue.doToValue) fall through to parseLongFromTo, which wraps silently, 
so parsing 9999999999999999999 yields -8446744073709551617. CHARACTER_SOURCE 
(JsonParserUsingCharacterSource.decodeNumber) has no branch past isLong and 
returns null instead.
   3. The lexer-based path (JsonToken.getValue) already returns Integer, Long, 
or BigInteger, so the parser types disagree on the same input.
   
   Added the missing BigInteger branch at the three decode sites so every 
parser type matches the JsonToken contract. The new regression test runs across 
all four parser types and fails before the change.


-- 
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]

Reply via email to