You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
发现个bug: com.googlecode.aviator.lexer.ExpressionLexer 类 第263 - 269 行: // if the long value is out of range,then it must be negative, so // we make it as a big integer. if (lval < 0) { value = new BigInteger(sb.toString()); } else { value = lval; } 这里提到 :如果值 超过了 long.max_value , 则会把源值通过 BigInteger 来封装,前提是 lval < 0 。 经测试发现: AviatorEvaluator.execute("20190622154026220130025363") , 此时 lval = -3317435537657544813 , 此时会处理为 new BigInteger("20190622154026220130025363") , 这种情况下,没问题。 AviatorEvaluator.execute("2017122615550747128008704"),此时 lval = 8044578755077902336 , 这种情况下则出问题了,因为 lval > 0 , 不会对源值进行 BigInteger 封装,而是直接把 lval = 8044578755077902336 做为结果输出了。
The text was updated successfully, but these errors were encountered:
发现个bug: com.googlecode.aviator.lexer.ExpressionLexer 类 第263 - 269 行: // if the long value is out of range,then it must be negative, so // we make it as a big integer. if (lval < 0) { value = new BigInteger(sb.toString()); } else { value = lval; } 这里提到 :如果值 超过了 long.max_value , 则会把源值通过 BigInteger 来封装,前提是 lval < 0 。 经测试发现: AviatorEvaluator.execute("20190622154026220130025363") , 此时 lval = -3317435537657544813 , 此时会处理为 new BigInteger("20190622154026220130025363") , 这种情况下,没问题。 AviatorEvaluator.execute("2017122615550747128008704"),此时 lval = 8044578755077902336 , 这种情况下则出问题了,因为 lval > 0 , 不会对源值进行 BigInteger 封装,而是直接把 lval = 8044578755077902336 做为结果输出了。
The text was updated successfully, but these errors were encountered: