[jboss-jira] [JBoss JIRA] Created: (JBRULES-1429) NPE in ObjectEqualsComparator
Serge Brisson (JIRA)
jira-events at lists.jboss.org
Thu Jan 17 07:49:19 EST 2008
NPE in ObjectEqualsComparator
-----------------------------
Key: JBRULES-1429
URL: http://jira.jboss.com/jira/browse/JBRULES-1429
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.4
Environment: Any.
Reporter: Serge Brisson
This NPE occurs when an object is updated and one of its fields becomes non-null (was null before).
This problem is new in 4.0.4 and was absent in 4.0.3.
The org.drools.base.evaluators.ObjectFactory$ObjectEqualsComparator#equals method begins with:
if ( arg0 == null ) {
return arg1 == null;
}
if( arg1 != null && arg1 instanceof ShadowProxy ) {
return arg1.equals( arg0 );
}
where is should be:
if ( arg0 == null ) {
return arg1 == null;
}
if (arg1 == null) {
return false;
}
if (arg1 instanceof ShadowProxy ) {
return arg1.equals( arg0 );
}
Note: the NPE occurs later in this method when a method of arg1 is called.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list