[
https://issues.jboss.org/browse/JBRULES-3536?page=com.atlassian.jira.plug...
]
RH Bugzilla Integration commented on JBRULES-3536:
--------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> made a comment on [bug
826968|https://bugzilla.redhat.com/show_bug.cgi?id=826968]
The problem was indeed caused by a null key passed to TreeMap. I fixed this issue by
initializing all the TreeMaps with a null safe comparator.
NPE adding a null key to a TreeMap with JDK7
--------------------------------------------
Key: JBRULES-3536
URL:
https://issues.jboss.org/browse/JBRULES-3536
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: Mario Fusco
Assignee: Mario Fusco
Fix For: 5.3.2.Final, 5.5.0.Beta1
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira