[jboss-jira] [JBoss JIRA] Assigned: (JBRULES-1308) getFactHandle with equality-based assert behavior

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Wed Oct 31 10:09:44 EDT 2007


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

Edson Tirelli reassigned JBRULES-1308:
--------------------------------------

    Assignee: Edson Tirelli

> getFactHandle with equality-based assert behavior
> -------------------------------------------------
>
>                 Key: JBRULES-1308
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1308
>             Project: JBoss Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.0.3
>            Reporter: Adam Lewandowski
>         Assigned To: Edson Tirelli
>         Attachments: GetFactHandleWithEqualityTest.java
>
>
> If I set my rule base to use equality-based assert behavior, I'm expecting to be able to use the getFactHandle(object) method to retrieve a previously asserted fact by providing an equivalent (by equals() and hashCode()) object as an argument. This appears to not be the case, as AbstractWorkingMemory uses it's identityMap and associated IdentityAssertMapComparator to do the getFactHandle lookup instead of the assertMap and EqualityAssertMapComparator. This causes the lookup to be done with the system hashCode() method and not the overridden version supplied in my fact class. The lookup thus fails and returns null. 
> See attached unit test.

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