You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2011/06/01 13:27:47 UTC

[jira] [Created] (JEXL-112) Cannot parse Integer.MIN_VALUE

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


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

[jira] [Closed] (JEXL-112) Cannot parse Integer.MIN_VALUE

Posted by "Sebb (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JEXL-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb closed JEXL-112.
---------------------

    
> 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.1
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (JEXL-112) Cannot parse Integer.MIN_VALUE

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
     [ 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