You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2013/01/19 21:54:55 UTC

svn commit: r1435693 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java

Author: struberg
Date: Sat Jan 19 20:54:55 2013
New Revision: 1435693

URL: http://svn.apache.org/viewvc?rev=1435693&view=rev
Log:
OWB-344 fix bug in correct InterceptionType inteceptor detection


Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java?rev=1435693&r1=1435692&r2=1435693&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java Sat Jan 19 20:54:55 2013
@@ -139,7 +139,7 @@ public class InterceptorResolutionServic
 
             calculateEjbMethodInterceptors(methodInterceptorInfo, allUsedEjbInterceptors, classLevelEjbInterceptors, annotatedMethod);
 
-            calculateCdiMethodInterceptors(methodInterceptorInfo, allUsedCdiInterceptors, annotatedMethod, classInterceptorBindings);
+            calculateCdiMethodInterceptors(methodInterceptorInfo, InterceptionType.AROUND_INVOKE, allUsedCdiInterceptors, annotatedMethod, classInterceptorBindings);
 
             calculateCdiMethodDecorators(methodInterceptorInfo, decorators, annotatedMethod);
 
@@ -239,7 +239,7 @@ public class InterceptorResolutionServic
                 foundMethods.add(lifecycleMethod);
                 calculateEjbMethodInterceptors(methodInterceptorInfo, allUsedEjbInterceptors, classLevelEjbInterceptors, lifecycleMethod);
 
-                calculateCdiMethodInterceptors(methodInterceptorInfo, allUsedCdiInterceptors, lifecycleMethod, classInterceptorBindings);
+                calculateCdiMethodInterceptors(methodInterceptorInfo, interceptionType, allUsedCdiInterceptors, lifecycleMethod, classInterceptorBindings);
             }
         }
 
@@ -415,6 +415,7 @@ public class InterceptorResolutionServic
     }
 
     private void calculateCdiMethodInterceptors(BusinessMethodInterceptorInfo methodInterceptorInfo,
+                                                InterceptionType interceptionType,
                                                 Set<Interceptor<?>> allUsedCdiInterceptors,
                                                 AnnotatedMethod annotatedMethod,
                                                 Set<Annotation> classInterceptorBindings)
@@ -432,10 +433,6 @@ public class InterceptorResolutionServic
             return;
         }
 
-        InterceptionType interceptionType = methodInterceptorInfo.getInterceptionTypes().isEmpty()
-                                                ? InterceptionType.AROUND_INVOKE
-                                                : methodInterceptorInfo.getInterceptionTypes().iterator().next(); //X TODO dirty hack for now...
-
         List<Interceptor<?>> methodInterceptors
                 = webBeansContext.getBeanManagerImpl().resolveInterceptors(interceptionType, AnnotationUtil.asArray(cummulatedInterceptorBindings));