Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3536

NPE adding a null key to a TreeMap with JDK7

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.3.2.Final, 5.5.0.Beta1
    • None
    • None
    • None

      The following tests throw NPE:

      org.drools.verifier.data.VerifierDataMapsTest.testSaveVerifierComponentAndGetForAllComponentTypes
      org.drools.verifier.data.VerifierDataMapsTest.testSaveVerifierComponentAndGetForAllFields
      org.drools.verifier.data.VerifierDataMapsTest.testSaveVerifierComponentAndGetForAllRestrictions
      org.drools.verifier.data.VerifierDataMapsTest.testSavePatternAndGet

      java.lang.NullPointerException
      at java.util.TreeMap.compare(TreeMap.java:1188)
      at java.util.TreeMap.put(TreeMap.java:531)
      at org.drools.verifier.data.VerifierDataMaps.add(VerifierDataMaps.java:162)
      at org.drools.verifier.data.VerifierDataMapsTest.saveVerifierComponentAndGet(VerifierDataMapsTest.java:321)
      at org.drools.verifier.data.VerifierDataMapsTest.testSaveVerifierComponentAndGetForAllComponentTypes(VerifierDataMapsTest.java:105)

      All the tests in class fail with similar exception. From the test, it seems that objects added to the map are not null and their values used in compareTo() are not null either. This happens only with Sun JDK 7.

              mfusco@redhat.com Mario Fusco
              mfusco@redhat.com Mario Fusco
              Archiver:
              rhn-support-ceverson Clark Everson

                Created:
                Updated:
                Resolved:
                Archived: