Just for people who will read this thread later complete Qux class is:<div><br></div><div><pre style="word-wrap:break-word;white-space:pre-wrap">public class Qux extends Baz&lt;String&gt; {

    public Qux(String name) {
    }

}</pre><pre style="word-wrap:break-word;white-space:pre-wrap"><br></pre><div><div><i>Romain Manni-Bucau</i></div><div><i>Twitter: <a href="https://twitter.com/rmannibucau" target="_blank">@rmannibucau</a></i></div><div><i>Blog: </i><a href="http://rmannibucau.wordpress.com/" target="_blank"><i>http://rmannibucau.wordpress.com/</i></a></div>

<div><i>LinkedIn: </i><font color="#0000ee"><i><u><a href="http://fr.linkedin.com/in/rmannibucau" target="_blank">http://fr.linkedin.com/in/rmannibucau</a></u></i></font></div><div><i><span style="background-color:rgb(255,255,255)">Github: </span><a href="https://github.com/rmannibucau" target="_blank">https://github.com/rmannibucau</a></i></div>

<div><br></div></div>
<br><br><div class="gmail_quote">2013/7/8 Martin Kouba <span dir="ltr">&lt;<a href="mailto:mkouba@redhat.com" target="_blank">mkouba@redhat.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Re Arne&#39;s question:<br>
Yes, Baz is a managed bean and AmbiguousResolutionException should not<br>
be thrown because Qux is not a managed bean (doesn&#39;t have a public<br>
no-arg constructor).<br>
<br>
Re Marko&#39;s findings:<br>
Yes, the TCK assertions are not up to date and Baz&lt;T&gt; is not assignable<br>
to Baz&lt;String&gt;, because String is not assignable from Object (no bound<br>
is defined -&gt; Object is assumed; see JSL 4.4). So I confirm a TCK issue.<br>
<br>
IMO this would deserve a proper cleanup...<br>
<br>
Martin<br>
<br>
Dne 8.7.2013 01:22, Marko Lukša napsal(a):<br>
<div class="HOEnZb"><div class="h5">&gt; I&#39;d say it&#39;s a bug. While Baz indeed is a managed bean, it shouldn&#39;t be<br>
&gt; injected into injection point with type Baz&lt;String&gt; nor Baz&lt;List&lt;Qux&gt;&gt;.<br>
&gt; So I believe you&#39;re right in saying that this test should fail with<br>
&gt; UnsatisfiedResolutionException.<br>
&gt;<br>
&gt; There was a change made to the spec way back in 2010 (see [1]), but the<br>
&gt; TCK apparently wasn&#39;t updated then. I&#39;ve filed an issue in the TCK jira<br>
&gt; [2].<br>
&gt;<br>
&gt; The problem isn&#39;t only in the TCK, but also in the spec itself. Some of<br>
&gt; the examples in section 5.2.4 don&#39;t conform to the rules defined in the<br>
&gt; same section (according to the rules, bean Dao&lt;T extends Persistent&gt;<br>
&gt; shouldn&#39;t be eligible for injection into Dao&lt;Order&gt; or Dao&lt;User&gt;). I<br>
&gt; remember asking about this a year ago ([3]), but I didn&#39;t articulate the<br>
&gt; problem properly.<br>
&gt;<br>
&gt; [1]<br>
&gt; <a href="https://github.com/cdi-spec/cdi/commit/b32243350ace6a0bba337f91a35f5fd05c151f14" target="_blank">https://github.com/cdi-spec/cdi/commit/b32243350ace6a0bba337f91a35f5fd05c151f14</a><br>
&gt; [2] <a href="https://issues.jboss.org/browse/CDITCK-349" target="_blank">https://issues.jboss.org/browse/CDITCK-349</a><br>
&gt; [3] <a href="http://lists.jboss.org/pipermail/cdi-dev/2012-April/001742.html" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/2012-April/001742.html</a><br>
&gt;<br>
&gt; Marko<br>
&gt;<br>
&gt; On 7.7.2013 16:04, Arne Limburg wrote:<br>
&gt;&gt; Hi all,<br>
&gt;&gt;<br>
&gt;&gt; At the OpenWebBeans list we are currently discussing handling of<br>
&gt;&gt; generics in CDI.<br>
&gt;&gt; I found a test in the CDI 1.1 TCK, which imho has a bug. The test<br>
&gt;&gt; is org.jboss.cdi.tck.tests.inheritance.generics.MemberLevelInheritanceTest<br>
&gt;&gt; and the (simplified) deployment scenario is the following:<br>
&gt;&gt;<br>
&gt;&gt; public class Baz&lt;T&gt; {<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; public class Qux extends Baz&lt;String&gt; {<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; @Vetoed<br>
&gt;&gt; public class Bar&lt;T1, T2&gt; {<br>
&gt;&gt;   @Inject<br>
&gt;&gt;   private Baz&lt;T1&gt; baz;<br>
&gt;&gt;   @Inject<br>
&gt;&gt;   private Baz&lt;List&lt;T2&gt;&gt; t2BazList;<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; @RequestScoped<br>
&gt;&gt; public class Foo extends Bar&lt;String, Qux&gt; {<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; public class Producer {<br>
&gt;&gt;   @Produces<br>
&gt;&gt;   @Amazing<br>
&gt;&gt;   public String produceString() {<br>
&gt;&gt;     return &quot;ok&quot;;<br>
&gt;&gt;   }<br>
&gt;&gt;<br>
&gt;&gt;   @Produces<br>
&gt;&gt;   public String[] produceStringArray() {<br>
&gt;&gt;     return new String[0];<br>
&gt;&gt;   }<br>
&gt;&gt;<br>
&gt;&gt;   @Produces<br>
&gt;&gt;   public Baz&lt;Baz&lt;Qux&gt;&gt; produceBazBazQux() {<br>
&gt;&gt;     return new Baz();<br>
&gt;&gt;   }<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; The class Bar has some more injection points, but that does not matter.<br>
&gt;&gt; Due to the TCK this deployment should work, but I don&#39;t know how.<br>
&gt;&gt; Question: Is Baz a Bean (I suppose so) and may it be injected into<br>
&gt;&gt; Bean Foo, more precisely into the second injection point of class Bar?<br>
&gt;&gt; - If yes, it also should be injected into the first injection<br>
&gt;&gt; point, right? This would lead to an AmbiguousResolutionException since<br>
&gt;&gt; Qux may also be injected into the first injection point.<br>
&gt;&gt; - If no, the deployment should fail with a<br>
&gt;&gt; UnsatisfiedResolutionException since there is no Bean that can be<br>
&gt;&gt; injected into that injection point.<br>
&gt;&gt;<br>
&gt;&gt; Is this a bug in the TCK and if not, how is this supposed to work?<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt; Arne<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; cdi-dev mailing list<br>
&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
</div></div></blockquote></div><br></div>