[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1429) NPE in ObjectEqualsComparator

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Tue Feb 19 12:31:27 EST 2008


     [ http://jira.jboss.com/jira/browse/JBRULES-1429?page=all ]

Edson Tirelli closed JBRULES-1429.
----------------------------------

    Fix Version/s: 4.0.5
                   5.0.0-M1
       Resolution: Duplicate Issue
         Assignee: Edson Tirelli

Fixed in JBRULES-1435.

> 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
>         Assigned To: Edson Tirelli
>             Fix For: 4.0.5, 5.0.0-M1
>
>
> 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