[weld-issues] [JBoss JIRA] Commented: (WELD-335) RIBean needs new definition of equality

Pete Muir (JIRA) jira-events at lists.jboss.org
Fri Jan 15 13:00:47 EST 2010


    [ https://jira.jboss.org/jira/browse/WELD-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12506374#action_12506374 ] 

Pete Muir commented on WELD-335:
--------------------------------

Thanks Stuart, this looks a good approach.

I've done significant changes to the patch including tidy up of generic usage, consistent code style, rename of some classes and methods and committed, please review.

Beans already have the archive in which they are encoded into their id (see line 49 of RIBean where we add the manager id to the id string), so that is already correct. For this reason I've removed the comparison of bean class, as it is redundant.

> RIBean needs new definition of equality
> ---------------------------------------
>
>                 Key: WELD-335
>                 URL: https://jira.jboss.org/jira/browse/WELD-335
>             Project: Weld
>          Issue Type: Bug
>          Components: Class Beans (Managed and Session), Producers (Methods, Fields and Disposers), Reflection layer
>            Reporter: Stuart Douglas
>            Assignee: Stuart Douglas
>            Priority: Critical
>             Fix For: 1.0.1.CR1
>
>         Attachments: multiple-beans-1.diff, multiple-beans-2.diff, ri-bean-id-creator.patch, ri-bean-id-creator2.patch
>
>
> Due to the implementation of equals/hashCode in RIBean only one ManagedBean is allowed per underlying java class, so for example if you use the SPI to add two AnnotatedTypes with the same underlying class but different qualifiers only one will get installed.
> The following patch fixes this, would it be possible to get some feedback on it?
> The AnnotatedTypeIdProvider class in the patch can also be used to implement meaningful equlity for WeldAnnotated*

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list