Bug 826968

Summary: Drools in BRMS 5.3 cannot be certified with JDK7
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Lukáš Petrovický <lpetrovi>
Component: BRE (Expert, Fusion)Assignee: Mario Fusco <mfusco>
Status: VERIFIED --- QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: BRMS 5.3.0.GACC: mvecera
Target Milestone: ER9   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 826935 Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 826935    
Bug Blocks:    

Description Lukáš Petrovický 2012-05-31 10:35:46 UTC
+++ This bug was initially created as a clone of Bug #826935 +++

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.

Comment 1 Lukáš Petrovický 2012-06-07 19:06:33 UTC
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 14:50:03 UTC
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 09:32:50 UTC
This issue's fixes  have been picked by ER9. Please verify them on ER9.

Comment 4 Lukáš Petrovický 2012-06-14 14:18:54 UTC
The mentioned issues don't appear in ER9 anymore. VERIFIED.