Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1429

NPE in ObjectEqualsComparator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: 4.0.4
    • Fix Version/s: 4.0.5, 5.0.0.M1
    • Component/s: None
    • Labels:
      None
    • Environment:

      Any.

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tirelli Edson Tirelli
                  Reporter:
                  sfbriss Serge Brisson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: