Bug 826968 - Drools in BRMS 5.3 cannot be certified with JDK7
Drools in BRMS 5.3 cannot be certified with JDK7
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion) (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
urgent Severity urgent
: ER9
: BRMS 5.3.0.GA
Assigned To: Mario Fusco
Lukáš Petrovický
Depends On: 826935
  Show dependency treegraph
Reported: 2012-05-31 06:35 EDT by Lukáš Petrovický
Modified: 2012-06-14 10:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 826935
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBRULES-3536 Major Resolved NPE adding a null key to a TreeMap with JDK7 2012-08-26 21:38:13 EDT

  None (edit)
Description Lukáš Petrovický 2012-05-31 06:35:46 EDT
+++ This bug was initially created as a clone of Bug #826935 +++

The following tests throw NPE:


	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.
Comment 1 Lukáš Petrovický 2012-06-07 15:06:33 EDT
Mario, would you mind looking at this? It's an approved blocker. Feel free to reassign, if you feel like this is more appropriate for someone else.
Comment 2 Mario Fusco 2012-06-08 10:50:03 EDT
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.
Comment 3 Ryan Zhang 2012-06-13 05:32:50 EDT
This issue's fixes  have been picked by ER9. Please verify them on ER9.
Comment 4 Lukáš Petrovický 2012-06-14 10:18:54 EDT
The mentioned issues don't appear in ER9 anymore. VERIFIED.

Note You need to log in before you can comment on or make changes to this bug.