commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Created] (JEXL-112) Cannot parse Integer.MIN_VALUE
Date Wed, 01 Jun 2011 11:27:47 GMT
Cannot parse Integer.MIN_VALUE

                 Key: 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:

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"

Note that the input does not include the minus sign, which is presumably going to be applied

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message