Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1

      Description

      Trying to evaluate a long in a Jexl expression and the engine tries to cast it to an Integer.

      Expression e = engine.createExpression("TIMESTAMP > 20100102000000");
      JexlContext ctx = new MapContext();
      ctx.set("TIMESTAMP", new Long("20100103000000"));
      e.evaluate(ctx);

      throws a NumberFormatException at Integer.parseInt().

        Activity

        Hide
        Dave Marion added a comment -

        Related to this, I see that there are no node types for Long and Double, only Integer and Float. Why is that? Could that be a potential solution to this problem?

        Show
        Dave Marion added a comment - Related to this, I see that there are no node types for Long and Double, only Integer and Float. Why is that? Could that be a potential solution to this problem?
        Hide
        Henri Biestro added a comment -

        I've added a test in the trunk based on your code (see IssuesTest.test117()); the issue does not appear anymore.
        I suspect this was the same pb as JEXL-112.

        Show
        Henri Biestro added a comment - I've added a test in the trunk based on your code (see IssuesTest.test117()); the issue does not appear anymore. I suspect this was the same pb as JEXL-112 .
        Hide
        Dave Marion added a comment -

        Great, do you know when 2.0.2 will be released? I just put in a workaround by extending the Interpreter.

        Show
        Dave Marion added a comment - Great, do you know when 2.0.2 will be released? I just put in a workaround by extending the Interpreter.
        Hide
        Henri Biestro added a comment -

        No defined date and most likely a 2.1 instead (see http://apache-commons.680414.n4.nabble.com/JEXL-Towards-a-JEXL-2-1-release-tt3669436.html).
        In the mean time, you can use a 2.0.2-SNAPSHOT available in https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-jexl/ .
        Cheers,
        Henrib

        Show
        Henri Biestro added a comment - No defined date and most likely a 2.1 instead (see http://apache-commons.680414.n4.nabble.com/JEXL-Towards-a-JEXL-2-1-release-tt3669436.html ). In the mean time, you can use a 2.0.2-SNAPSHOT available in https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-jexl/ . Cheers, Henrib

          People

          • Assignee:
            Henri Biestro
            Reporter:
            Dave Marion
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development