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

A string is wrongly identified as FloatingPointNumber

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.1
    • 3.0
    • None

    Description

      When concatenating two strings with one containing an 'e' character, an ArithmeticException is thrown.

      The problem lies in the JexlArithmetic.isFloatingPointNumber() method in line 200.

      return ((string.indexOf(46) != -1) || (string.indexOf(101) != -1) || (string.indexOf(69) != -1));

      With this solution also the String "New York" or "hello.world" are floating point numbers. A solution with a regular expression would be better

      Attachments

        Activity

          People

            henrib Henri Biestro
            rnesselrath Robert Neßelrath
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: