<font size=2 face="sans-serif">Thank you Matej that's good to know. </font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Matej Novotny &lt;manovotn@redhat.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Benjamin Confino &lt;BENJAMIC@uk.ibm.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Cc: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">weld-dev@lists.jboss.org,
Emily Jiang &lt;EMIJIANG@uk.ibm.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">13/03/2018 09:36</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [weld-dev]
Potential bug with Typed not affecting if a &nbsp; &nbsp; &nbsp; &nbsp;ProducerMethod
is proxiable.</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
comments inline.<br>
<br>
Matej<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Benjamin Confino&quot; &lt;BENJAMIC@uk.ibm.com&gt;<br>
&gt; To: weld-dev@lists.jboss.org<br>
&gt; Cc: &quot;Emily Jiang&quot; &lt;EMIJIANG@uk.ibm.com&gt;<br>
&gt; Sent: Monday, March 12, 2018 6:40:27 PM<br>
&gt; Subject: [weld-dev] Potential bug with Typed not affecting if a &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ProducerMethod
is proxiable.<br>
&gt; <br>
&gt; Hello<br>
&gt; <br>
&gt; I can see something that might be a bug in weld. I attempted to work<br>
&gt; around </font></tt><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.jboss.org_projects_WELD_issues_WELD-2D2466&amp;d=DwICaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=hl8XiFr1UrTSgyXVc4KO_i51sM3Gyhlu1KZ4TkyseEQ&amp;m=ScbAGiokKoG8J7UIq97SogIlYzc6sVEtHpdb4KOqFw8&amp;s=Tv24CjpIwcNluyXRoaRewFcbDniYgUcUn6thtVXNjwY&amp;e="><tt><font size=2>https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.jboss.org_projects_WELD_issues_WELD-2D2466&amp;d=DwICaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=hl8XiFr1UrTSgyXVc4KO_i51sM3Gyhlu1KZ4TkyseEQ&amp;m=ScbAGiokKoG8J7UIq97SogIlYzc6sVEtHpdb4KOqFw8&amp;s=Tv24CjpIwcNluyXRoaRewFcbDniYgUcUn6thtVXNjwY&amp;e=</font></tt></a><tt><font size=2>
by using<br>
&gt; the@Typed annotation on a Producer Method to exclude the unproxiable
Types<br>
&gt; and thus avoid getting caught by the failing isBeanProxiable check.<br>
&gt; However the annotation did not affect whether or not the ProducerMethod
is<br>
&gt; proxiable. This might be a second bug.<br>
&gt; <br>
&gt; I have uploaded a recreate application which I have verified against<br>
&gt; Wildfly 11.0.0 here: </font></tt><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_benjamin-2Dconfino_TypedProducerBug&amp;d=DwICaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=hl8XiFr1UrTSgyXVc4KO_i51sM3Gyhlu1KZ4TkyseEQ&amp;m=ScbAGiokKoG8J7UIq97SogIlYzc6sVEtHpdb4KOqFw8&amp;s=7eRe_h7ECCu90QwZkeL2f8vjrGk8-Ky3F6KKRI9eroI&amp;e="><tt><font size=2>https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_benjamin-2Dconfino_TypedProducerBug&amp;d=DwICaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=hl8XiFr1UrTSgyXVc4KO_i51sM3Gyhlu1KZ4TkyseEQ&amp;m=ScbAGiokKoG8J7UIq97SogIlYzc6sVEtHpdb4KOqFw8&amp;s=7eRe_h7ECCu90QwZkeL2f8vjrGk8-Ky3F6KKRI9eroI&amp;e=</font></tt></a><tt><font size=2><br>
<br>
Thanks for reproducer, checking it now.<br>
<br>
&gt; <br>
&gt; To recreate you can download the pre-compiled binary from github,
deploy<br>
&gt; it to a version of Wildfly without the fix for WELD-2466, and visit
the<br>
&gt; url </font></tt><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8080_WeldRecreateProducesExtendedAbstract_inheritance&amp;d=DwICaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=hl8XiFr1UrTSgyXVc4KO_i51sM3Gyhlu1KZ4TkyseEQ&amp;m=ScbAGiokKoG8J7UIq97SogIlYzc6sVEtHpdb4KOqFw8&amp;s=UBmyUqqsPVaalvwahMH_dEjkrRsQcwOheatneSMHVNQ&amp;e="><tt><font size=2>https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8080_WeldRecreateProducesExtendedAbstract_inheritance&amp;d=DwICaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=hl8XiFr1UrTSgyXVc4KO_i51sM3Gyhlu1KZ4TkyseEQ&amp;m=ScbAGiokKoG8J7UIq97SogIlYzc6sVEtHpdb4KOqFw8&amp;s=UBmyUqqsPVaalvwahMH_dEjkrRsQcwOheatneSMHVNQ&amp;e=</font></tt></a><tt><font size=2><br>
&gt; this will trigger a call to getInjectableReference() which will fail<br>
&gt; because the ProducerMethod for recreate.BeanProducer.produceBean()
is not<br>
&gt; proxiable.<br>
&gt; <br>
&gt; If you debug into constructor for ProducerMethod at line 76 you will
see<br>
&gt; that the proxiable flag is set using method.getTypeClosures() ; which<br>
&gt; returns all the associated types, rather than just those specified
with<br>
&gt; the Typed() paramater.<br>
&gt; <br>
&gt; Is this the correct behaviour? Should a ProducerMethod be unproxiable
even<br>
&gt; with Typed limiting the bean types to proxiable types?<br>
<br>
I think this is correct behaviour because:<br>
* Weld needs to proxy whole class hierarchy, we cannot just skip one underlying
class when creating the proxy object<br>
* @Typed is then used to determine where can this bean be injected, e.g.
which bean types are used to match it against required types of each injection
point<br>
<br>
Therefore, @Typed is not really connected to proxyability but rather to
assignability of that produced bean to a given injection point.<br>
<br>
I'll double check this but I really think it's correct behaviour.<br>
<br>
&gt; <br>
&gt; Regards<br>
&gt; Benjamin<br>
&gt; Unless stated otherwise above:<br>
&gt; IBM United Kingdom Limited - Registered in England and Wales with
number<br>
&gt; 741598.<br>
&gt; Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
PO6 3AU<br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; weld-dev mailing list<br>
&gt; weld-dev@lists.jboss.org<br>
&gt; </font></tt><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.jboss.org_mailman_listinfo_weld-2Ddev&amp;d=DwICaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=hl8XiFr1UrTSgyXVc4KO_i51sM3Gyhlu1KZ4TkyseEQ&amp;m=ScbAGiokKoG8J7UIq97SogIlYzc6sVEtHpdb4KOqFw8&amp;s=zfPYGJTeMlNEu9b6uzEuu9Jh5DudVi-PdbzlGSY0EAg&amp;e="><tt><font size=2>https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.jboss.org_mailman_listinfo_weld-2Ddev&amp;d=DwICaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=hl8XiFr1UrTSgyXVc4KO_i51sM3Gyhlu1KZ4TkyseEQ&amp;m=ScbAGiokKoG8J7UIq97SogIlYzc6sVEtHpdb4KOqFw8&amp;s=zfPYGJTeMlNEu9b6uzEuu9Jh5DudVi-PdbzlGSY0EAg&amp;e=</font></tt></a><tt><font size=2><br>
<br>
</font></tt>
<br>
<br><font size=2 face="sans-serif"><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>