[
https://issues.apache.org/jira/browse/OWB-1099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15061726#comment-15061726
]
Mark Struberg commented on OWB-1099:
------------------------------------
Thanks for the explanation of your use case!
So what you do is you store the AnnotatedType as key in a Map. The value is the
InjectionTarget or Producer, right?
For that an instance equals would work perfectly fine and would also be
perfectly portable (as all the steps where Annotated could be changed are
already behind you).
What I'm curious about is why you store a new AnnotatedWrapper(annotated)
instead of the native annotated as key?
You should easily be able to use the native Annotated as key and have a small
pojo containing it's AnnotatedWrapper + the Bean as value, right?
Again: this is not a container problem because your current code really just
works with a very few Weld versions and only if there is no other portable
Extension modifying the Annotated.
> Annotated SPI implementations do not override equals and hashCode
> -----------------------------------------------------------------
>
> Key: OWB-1099
> URL: https://issues.apache.org/jira/browse/OWB-1099
> Project: OpenWebBeans
> Issue Type: Bug
> Affects Versions: 1.6.2
> Reporter: Antonin Stefanutti
> Assignee: Mark Struberg
>
> The implementations of the {{Annotated}} SPIs do not override {{equals}} and
> {{hashCode}}.
> This prevents from looking up bean definitions by annotated elements which is
> often required when developing CDI extensions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)