> Am 11.12.2016 um 22:24 schrieb John D. Ament <johndam...@apache.org>:
> 
> However, using bean.getBeanClass() is more correct.

Nope, read the spec paragraph for producer methods and fields:

11.1. The Bean interface
"• getBeanClass() returns the bean class of the managed bean or session bean or 
of the bean that declares the producer method or field."

So for a producer method or field getBeanClass() will NOT give you the type of 
the produced contextual instance but the class which _contains_ the producer!
Means relying on getBeanClass() to produce the proxy is plain wrong and Weld 
should not do that (IF they do, did not verify that)!

LieGrue,
strub

Reply via email to