[jboss-jira] [JBoss JIRA] Commented: (JBRULES-573) EqualityAssertMapComparator does not work with JSR94 Fact Handles

Juergen none (JIRA) jira-events at jboss.com
Wed Nov 29 12:42:55 EST 2006


    [ http://jira.jboss.com/jira/browse/JBRULES-573?page=comments#action_12347924 ] 
            
Juergen none commented on JBRULES-573:
--------------------------------------

org.drools.jsr94.rules.Jsr94FactHandleFactory::getFactHandleType():
    public Class getFactHandleType() {
        return DefaultFactHandle.class;
    }

Correct: (?)
    public Class getFactHandleType() {
        return Jsr94FactHandle.class;
    }


> EqualityAssertMapComparator does not work with JSR94 Fact Handles
> -----------------------------------------------------------------
>
>                 Key: JBRULES-573
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-573
>             Project: JBoss Rules
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.0.5
>         Environment: java 1.5.0_09
>            Reporter: Juergen none
>         Assigned To: Mark Proctor
>
> Equal objects are asserted multiple times via jsr94 interface
> Using jsr94 interface to use drools stateful rule session
> Assert behaviour set to equality:
> PROPERTY_ASSERT_BEHAVIOR = RuleBaseConfiguration.WM_BEHAVIOR_EQUALITY
> fact handle factory creates org.drools.jsr94.rules.Jsr94FactHandle objects
> BUT:
> org.drools.common.EqualityAssertMapComparator::hashCodeOf()
> obj.getClass() == this.factHandleClass is false because
> this.factHandleClass is DefaultFactHandle and
> obj.getClass() is Jsr94FactHandle
> --> so instead of hashcode of object wrapped by handle, hashcode of facthandle object is used --> equal objects are asserted multiple times
> GUESS: either
> - obj.getClass() instanceof this.factHandleClass or
> - this.factHandleClass should be set to Jsr94FactHandle?

-- 
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