<font size=2 face="sans-serif">Hello<br>
<br>
I can see something that might be a bug in weld. I attempted to work around
</font><a href="https://issues.jboss.org/projects/WELD/issues/WELD-2466"><font size=2 color=blue face="sans-serif">https://issues.jboss.org/projects/WELD/issues/WELD-2466</font></a><font size=2 face="sans-serif">
by using the@Typed annotation on a Producer Method to exclude the unproxiable
Types and thus avoid getting caught by the failing isBeanProxiable check.
However the annotation did not affect whether or not the ProducerMethod
is proxiable. This might be a second bug. </font>
<br>
<br><font size=2 face="sans-serif">I have uploaded a recreate application
which I have verified against Wildfly 11.0.0 here: </font><a href="https://github.com/benjamin-confino/TypedProducerBug"><font size=2 color=blue face="sans-serif">https://github.com/benjamin-confino/TypedProducerBug</font></a>
<br>
<br><font size=2 face="sans-serif">To recreate you can download the pre-compiled
binary from github, deploy it to a version of Wildfly without the fix for
WELD-2466, and visit the url </font><a href=http://localhost:8080/WeldRecreateProducesExtendedAbstract/inheritance><font size=2 color=blue face="sans-serif">http://localhost:8080/WeldRecreateProducesExtendedAbstract/inheritance</font></a><font size=2 face="sans-serif">
this will trigger a call to getInjectableReference() which will fail because
the ProducerMethod for </font><font size=2 face="Monospace">recreate.BeanProducer.produceBean()</font><font size=2 face="sans-serif">
is not proxiable. </font>
<br>
<br><font size=2 face="sans-serif">If you debug into constructor for ProducerMethod
at line 76 you will see that the </font><font size=2 color=#0021bf face="Monospace">proxiable</font><font size=2 face="sans-serif">
flag is set using method.getTypeClosures() ; which returns all the associated
types, rather than just those specified with the Typed() paramater. <br>
<br>
Is this the correct behaviour? Should a ProducerMethod be unproxiable even
with Typed limiting the bean types to proxiable types? <br>
<br>
Regards<br>
Benjamin<br>
Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU<br>
</font>