<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</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; font-family: Calibri, sans-serif;">
<div>Hi,</div>
<div><br>
</div>
<div>I found an issue in either the spec or the tck, which I would like to discuss:</div>
<div>The TCK-Test&nbsp;org.jboss.cdi.tck.tests.event.fires.FireEventTest.testTypeVariableEventTypeFails</div>
<div>uses the following bean to fire an event by calling the method fireWithTypeVariable()</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(147, 26, 104);">
public<span style="color: #000000"> </span>class<span style="color: #000000"> Bar {</span></p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(119, 119, 119);">
<span style="color: #000000">&nbsp; &nbsp; </span>@Inject</p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; <span style="color: #931a68">
private</span> Event&lt;Foo&lt;? <span style="color: #931a68">extends</span> Number&gt;&gt; <span style="color: #0326cc">
event</span>;</p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; <span style="color: #931a68">
public</span> &lt;T <span style="color: #931a68">extends</span> Number&gt; <span style="color: #931a68">
void</span> fireWithTypeVariable() {</p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0326cc">
event</span>.fire(<span style="color: #931a68">new</span> Foo&lt;T&gt;());</p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco;">&nbsp; &nbsp; }</p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Monaco;">}</p>
</div>
<div><br>
</div>
<div>The TCK expects this test to fail because of the type variable in the instance created by new Foo&lt;T&gt;()</div>
<div>However, the spec states in 10.3.1 „<span style="font-family: Helvetica; font-size: 10px;">If the container&nbsp;</span><span style="font-family: Helvetica; font-size: 10px;">is unable to resolve the parameterized type of the event object, it uses the specified
 type to infer the parameterized type of the&nbsp;</span><span style="font-family: Helvetica; font-size: 10px;">event types.</span>“</div>
<div>Imho in this case the container is able to resolve T to &quot;? extends Number“ and the spec does not prohibit an event to have a wildcard type. So since T is not unresolvable, this test case should not expect the container to throw an exception. If we consider
 T not to be resolved, because it resolves to a wildcard type, we should mention this somewhere in the spec. Or am I missing something?</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Arne</div>
<div>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</body>
</html>