Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      windows oracle jvm 1.6_25

      Description

      Comparing a vaule to null using unequals (!=) yields false!

              Map<String, Integer> m = new HashMap<String, Integer>();
              m.put("a", 1);
              m.put("b", null);
              m.put("c", 1);
              JXPathContext c = JXPathContext.newContext(m);
              System.out.println(c.getValue("a != b") + " should be true");
              System.out.println(c.getValue("a != c") + " should be false");
              System.out.println(c.getValue("a = b") + " should be false");
              System.out.println(c.getValue("a = c") + " should be true");
              System.out.println(c.getValue("not(a = b)") + " should be true");
              System.out.println(c.getValue("not(a = c)") + " should be false");
      

      Output using 1.3:
      false should be true
      false should be false
      false should be false
      true should be true
      true should be true
      false should be false

      In 1.2 it works correctly!

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Johannes Stelzer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development