[
https://issues.apache.org/jira/browse/OWB-868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13847974#comment-13847974
]
Joe Bergmark commented on OWB-868:
----------------------------------
I tested this recently and I believe it works on trunk now. It might have been
fixed during the 1.2 rework.
> Producer ArrayList<String> + producer List<Integer> =
> j.e.i.AmbiguousResolutionException
> ----------------------------------------------------------------------------------------
>
> Key: OWB-868
> URL: https://issues.apache.org/jira/browse/OWB-868
> Project: OpenWebBeans
> Issue Type: Bug
> Affects Versions: 1.1.8
> Environment: J2SE + IBM JDK 7
> Reporter: Denis Forveille
> Attachments: OWB-868.zip
>
>
> With this bean that provides 2 producers that return 2 differents kinds of
> objects:
> @Produces
> @Named("list1")
> public ArrayList<String> getListe1() {
> return null;
> }
> @Produces
> @Named("list2")
> public List<Integer> getListe2() {
> return null;
> }
> And this bean that get injected one of the produced object:
> @Inject public List<Integer> listInteger;
> The application fails with
> "javax.enterprise.inject.AmbiguousResolutionException"
> Exception in thread "main"
> javax.enterprise.inject.AmbiguousResolutionException: Ambigious resolution
> found beans:
> List, Name:list2, WebBeans Type:PRODUCERMETHOD, API
> Types:[java.lang.Iterable,java.lang.Object,java.util.Collection,java.util.List],
>
> Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]
> ArrayList, Name:list1, WebBeans Type:PRODUCERMETHOD, API
> Types:[java.util.AbstractList,java.util.ArrayList,java.util.RandomAccess,java.lang.Iterable,java.util.AbstractCollection,java.util.Collection,java.lang.Object,java.io.Serializable,java.util.List,java.util.Collection,java.lang.Iterable,java.util.List,java.lang.Cloneable],
>
> Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]
> If we change the return type of the firts producer from ArrayList by List, it
> works !!
> Check the attached zip
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)