Author: marius.bogoevici
Date: 2009-12-15 00:09:58 -0500 (Tue, 15 Dec 2009)
New Revision: 5288
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java
Log:
Use Reflections.invoke
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java 2009-12-15
05:07:47 UTC (rev 5287)
+++
core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java 2009-12-15
05:09:58 UTC (rev 5288)
@@ -17,7 +17,6 @@
package org.jboss.weld.bean.proxy;
import static
org.jboss.weld.logging.messages.BeanMessage.UNEXPECTED_UNWRAPPED_CUSTOM_DECORATOR;
-import static org.jboss.weld.util.reflection.Reflections.ensureAccessible;
import java.lang.reflect.Method;
import java.util.List;
@@ -32,6 +31,7 @@
import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.introspector.jlr.MethodSignatureImpl;
import org.jboss.weld.serialization.spi.helpers.SerializableContextualInstance;
+import org.jboss.weld.util.reflection.Reflections;
/**
* Method handler for decorated beans
@@ -82,6 +82,7 @@
for (SerializableContextualInstance<Decorator<Object>, Object>
beanInstance : decoratorInstances)
{
WeldMethod<?, ?> decoratorMethod;
+
if (beanInstance.getContextual().get() instanceof DecoratorImpl<?>)
{
decoratorMethod =
((DecoratorImpl<?>)beanInstance.getContextual().get()).getAnnotatedItem().getWeldMethod(methodSignature);
@@ -100,6 +101,6 @@
}
}
- return ensureAccessible(method).invoke(getTargetInstance(), args);
+ return Reflections.invoke(method,getTargetInstance(), args);
}
}
Show replies by date