[weld-issues] [JBoss JIRA] Commented: (WELD-309) Alter equality for AnnotatedType so you can have >1 AnnotatedType for

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Sat Dec 5 22:43:30 EST 2009

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

Stuart Douglas commented on WELD-309:

After looking into this it appears the problem is the way the equality is defined for RIBean. Because the equals method only uses the RIBeans id, which is just bean type and class name, only one ManagedBean of a given type can be installed. 

This problem will only be evident when adding beans in the BeforeBeanDiscovery phase, as in normal operation you will not have the same java class with different annotations. 

As far as I can tell the correct way to fix this is to encode annotation information into a beans id, but I am not familiar enough with the code to know if this will cause problems elsewhere. Is this a reasonable approach?

> Alter equality for AnnotatedType so you can have >1 AnnotatedType for 
> ----------------------------------------------------------------------
>                 Key: WELD-309
>                 URL: https://jira.jboss.org/jira/browse/WELD-309
>             Project: Weld
>          Issue Type: Bug
>          Components: Reflection layer
>            Reporter: Pete Muir
>            Assignee: Stuart Douglas
>             Fix For: 1.0.1.CR1
> Currently we use the underlying class to perform equality, this is wrong.

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