Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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!

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: