[webbeans-issues] [JBoss JIRA] Updated: (WBRI-297) Delegate proxies cannot call public methods on delegate if class is not public

Pete Muir (JIRA) jira-events at lists.jboss.org
Fri Jul 24 14:09:29 EDT 2009


     [ https://jira.jboss.org/jira/browse/WBRI-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir updated WBRI-297:
---------------------------

    Fix Version/s: 1.0.0.CR1


> Delegate proxies cannot call public methods on delegate if class is not public
> ------------------------------------------------------------------------------
>
>                 Key: WBRI-297
>                 URL: https://jira.jboss.org/jira/browse/WBRI-297
>             Project: Web Beans
>          Issue Type: Bug
>          Components: Interceptors and Decorators
>            Reporter: David Allen
>            Priority: Minor
>             Fix For: 1.0.0.CR1
>
>
> If a non-public class is used as the type of a delegate in a decorator, then the decorator cannot actually call any of the delegate methods.  The following exception occurs unless the class is made public:
> java.lang.reflect.InvocationTargetException
> 	at org.jboss.webbeans.introspector.jlr.WBMethodImpl.invokeOnInstance(WBMethodImpl.java:198)
> 	at org.jboss.webbeans.bean.proxy.DecoratorProxyMethodHandler.invoke(DecoratorProxyMethodHandler.java:83)
> 	at org.jboss.jsr299.tck.tests.lookup.injectionpoint.Cat_$$_javassist_0.hello(Cat_$$_javassist_0.java)
> 	at org.jboss.jsr299.tck.tests.lookup.injectionpoint.InjectionPointTest.testIsDelegate(InjectionPointTest.java:212)
> 	at org.jboss.testharness.AbstractTest.run(AbstractTest.java:240)
> Caused by: java.lang.IllegalAccessException: Class org.jboss.webbeans.bean.proxy.DecoratorProxyMethodHandler can not access a member of class org.jboss.jsr299.tck.tests.lookup.injectionpoint.Cat with modifiers "public"
> 	at org.jboss.webbeans.bean.proxy.DecoratorProxyMethodHandler.invoke(DecoratorProxyMethodHandler.java:86)
> 	at org.jboss.jsr299.tck.tests.lookup.injectionpoint.Cat_$$_javassist_0.hello(Cat_$$_javassist_0.java)
> 	at org.jboss.jsr299.tck.tests.lookup.injectionpoint.CatDecorator.hello(CatDecorator.java:13)
> 	... 37 more
> ... Removed 34 stack frames

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the weld-issues mailing list