[cdi-dev] getBeanClass return value for build-in beans?

Jozef Hartinger jharting at redhat.com
Thu Aug 13 07:05:14 EDT 2015


On 12.8.2015 11:07, arjan tijms wrote:
> So given:
>
> public abstract class AbstractClass implements Interface { ... }
>
> If getTypes returns only Abstract.class, then only the methods defined
> by AbstractClass itself are implemented by the proxy. Those from
> Interface throw exceptions when called.
>
> If getTypes returns both Abstract.class and Interface.class, then all
> methods defined by AbstractClass and Interface are implemented by the
> proxy.
>
> Is this how things should be, or should the proxy generator see for
> itself that AbstractClass implements Interface?

I think this is a bug. Even if getTypes() returns AbstractClass only, 
you should still be able to call all the methods of AbstractClass 
(including those that come from Interface) and therefore, the proxy 
class generator should be generating these.

I filed https://issues.jboss.org/browse/WELD-2010 for Weld.


More information about the cdi-dev mailing list