<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; ">
<div style="font-family: Calibri, sans-serif; ">Hi all,</div>
<div style="font-family: Calibri, sans-serif; "><br>
</div>
<div style="font-family: Calibri, sans-serif; ">At the OpenWebBeans list we are currently discussing handling of generics in CDI.</div>
<div><font face="Calibri,sans-serif">I found a test in the CDI 1.1 TCK, which imho has a bug. The test is org.jboss.cdi.tck.tests.inheritance.generics.MemberLevelInheritanceTest and
</font>the (simplified) deployment scenario is the following:</div>
<div><br>
</div>
<div>
<div style="font-size: medium; ">public class Baz<T> {</div>
<div style="font-size: medium; ">}</div>
<div style="font-size: medium; "><br>
</div>
<div style="font-size: medium; ">public class Qux extends Baz<String> {</div>
<div style="font-size: medium; ">}</div>
<div style="font-size: medium; "><br>
</div>
<div style="font-size: medium; ">@Vetoed</div>
<div style="font-size: medium; ">public class Bar<T1, T2> {</div>
<div style="font-size: medium; "> @Inject</div>
<div style="font-size: medium; "> private Baz<T1> baz;</div>
<div style="font-size: medium; "> @Inject</div>
<div style="font-size: medium; "> private Baz<List<T2>> t2BazList;</div>
<div style="font-size: medium; ">}</div>
<div style="font-size: medium; "><br>
</div>
<div style="font-size: medium; ">@RequestScoped</div>
<div style="font-size: medium; ">public class Foo extends Bar<String, Qux> {</div>
<div style="font-size: medium; ">}</div>
<div style="font-size: medium; "><br>
</div>
<div style="font-size: medium; ">public class Producer {</div>
<div style="font-size: medium; "> @Produces</div>
<div style="font-size: medium; "> @Amazing</div>
<div style="font-size: medium; "> public String produceString() {</div>
<div style="font-size: medium; "> return "ok";</div>
<div style="font-size: medium; "> }</div>
<div style="font-size: medium; "><br>
</div>
<div style="font-size: medium; "> @Produces</div>
<div style="font-size: medium; "> public String[] produceStringArray() {</div>
<div style="font-size: medium; "> return new String[0];</div>
<div style="font-size: medium; "> }</div>
<div style="font-size: medium; "><br>
</div>
<div style="font-size: medium; "> @Produces</div>
<div style="font-size: medium; "> public Baz<Baz<Qux>> produceBazBazQux() {</div>
<div style="font-size: medium; "> return new Baz();</div>
<div style="font-size: medium; "> }</div>
<div style="font-size: medium; ">}</div>
</div>
<div>
<div style="font-size: medium; "><br>
</div>
<div style="font-size: medium; ">The class Bar has some more injection points, but that does not matter.</div>
<div style="font-size: medium; ">Due to the TCK this deployment should work, but I don't know how.</div>
<div style="font-size: medium; ">Question: Is Baz a Bean (I suppose so) and may it be injected into Bean Foo, more precisely into the second injection point of class Bar?</div>
<div style="font-size: medium; ">- If yes, it also should be injected into the first injection point, right? This would lead to an AmbiguousResolutionException since Qux may also be injected into the first injection point.</div>
<div style="font-size: medium; ">- If no, the deployment should fail with a UnsatisfiedResolutionException since there is no Bean that can be injected into that injection point.</div>
<div style="font-size: medium; "><br>
</div>
<div style="font-size: medium; ">Is this a bug in the TCK and if not, how is this supposed to work?</div>
</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Arne</div>
<div style="font-family: Calibri, sans-serif; ">
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</body>
</html>