[jboss-cvs] JBossAS SVN: r94323 - projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Oct 4 21:15:35 EDT 2009
Author: marius.bogoevici
Date: 2009-10-04 21:15:35 -0400 (Sun, 04 Oct 2009)
New Revision: 94323
Modified:
projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/DirectClassInterceptionHandler.java
Log:
Allow for no-argument lifecycle interceptors
Modified: projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/DirectClassInterceptionHandler.java
===================================================================
--- projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/DirectClassInterceptionHandler.java 2009-10-04 22:07:49 UTC (rev 94322)
+++ projects/interceptors/trunk/src/main/java/org/jboss/interceptor/proxy/DirectClassInterceptionHandler.java 2009-10-05 01:15:35 UTC (rev 94323)
@@ -127,7 +127,12 @@
{
if (!invocationQueue.isEmpty())
{
- return invocationQueue.remove().invoke(targetObject, this);
+
+ Method interceptorMethod = invocationQueue.remove();
+ if (interceptorMethod.getParameterTypes().length == 0)
+ return interceptorMethod.invoke(targetObject);
+ else
+ return interceptorMethod.invoke(targetObject, this);
} else
{
return delegateInvocationContext.proceed();
More information about the jboss-cvs-commits
mailing list