commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Biestro (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (JEXL-112) Cannot parse Integer.MIN_VALUE
Date Tue, 14 Jun 2011 13:37:48 GMT

     [ https://issues.apache.org/jira/browse/JEXL-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Biestro resolved JEXL-112.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.2

Committed revision 1135562.
M       src/test/java/org/apache/commons/jexl2/IssuesTest.java
M       src/test/java/org/apache/commons/jexl2/ArithmeticTest.java
M       src/main/java/org/apache/commons/jexl2/Interpreter.java
M       src/main/java/org/apache/commons/jexl2/parser/Parser.jjt
D       src/main/java/org/apache/commons/jexl2/parser/ASTIntegerLiteral.java
D       src/main/java/org/apache/commons/jexl2/parser/ASTFloatLiteral.java
A  +    src/main/java/org/apache/commons/jexl2/parser/ASTNumberLiteral.java
M       src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
M       src/main/java/org/apache/commons/jexl2/Debugger.java
M       src/main/java/org/apache/commons/jexl2/internal/introspection/IntrospectorBase.java

Also fixes JEXL-24; the fix adds syntax for literals of type double, big decimal, long and
big integer.

> Cannot parse Integer.MIN_VALUE
> ------------------------------
>
>                 Key: JEXL-112
>                 URL: https://issues.apache.org/jira/browse/JEXL-112
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Sebb
>            Assignee: Henri Biestro
>             Fix For: 2.0.2
>
>
> Cannot parse Integer.MIN_VALUE, because parsing does not take account of the sign.
> Sample code to show the error:
> {code}
> JEXL = new JexlEngine();
> JEXL.createScript(Integer.toString(Integer.MAX_VALUE)); // OK
> JEXL.createScript(Integer.toString(Integer.MIN_VALUE+1)); // OK
> JEXL.createScript(Integer.toString(Integer.MIN_VALUE)); // FAILS with java.lang.NumberFormatException:
For input string: "2147483648"
> {code}
> Note that the input does not include the minus sign, which is presumably going to be
applied later.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message