DescriptionWhat steps will reproduce the problem?
1. var x= 99999999999999999999999;
What is the expected output? What do you see instead?
Caused by: java.lang.NumberFormatException: For input string: "99999999999999999999999"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:441)
at java.lang.Long.valueOf(Long.java:508)
at java.lang.Long.decode(Long.java:653)
at com.google.caja.parser.js.Parser.toIntegerLiteral(Parser.java:996)
at com.google.caja.parser.js.Parser.parseExpressionAtom(Parser.java:1026)
at com.google.caja.parser.js.Parser.parseOp(Parser.java:792)
at com.google.caja.parser.js.Parser.parseOp(Parser.java:858)
at com.google.caja.parser.js.Parser.parseExpressionInt(Parser.java:727)
This change reparses the number literal as a BigDecimal before evaluating whether or not it can be represented
Patch Set 1 #Patch Set 2 : Remove parser failure in the prescence of unrepresentably large number literals #Patch Set 3 : Remove parser failure in the prescence of unrepresentably large number literals #
MessagesTotal messages: 3
|
||||||||||||||||||||||||||||