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

Issue with evaluation of concat of variables : \r + \n gives 0

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.2, 3.0
    • Labels:
      None
    • Environment:

      Windows Xp, jdk1.6.0_14

      Description

      Consider the following example :

      String jexlExp = "$$__INPUT + nl";
      Expression e = jexl.createExpression( jexlExp );
      // Create a context and add data
      JexlContext jc = new MapContext();
      jc.set("$$__INPUT", "\r" );
      jc.set("nl", "\n");
      // Now evaluate the expression, getting the result
      Object o = e.evaluate(jc);

      The result is 0 instead of "\r\n"

        Attachments

          Activity

            People

            • Assignee:
              henrib Henri Biestro
              Reporter:
              mmokashi Manoj Mokashi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: