Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-112

Cannot parse Integer.MIN_VALUE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.1
    • 2.1
    • None

    Description

      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 later.

      Attachments

        Issue Links

          Activity

            People

              henrib Henri Biestro
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: