[jboss-cvs] JBossAS SVN: r80175 - projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/registry.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 29 04:25:22 EDT 2008


Author: wolfc
Date: 2008-10-29 04:25:22 -0400 (Wed, 29 Oct 2008)
New Revision: 80175

Modified:
   projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/registry/InterceptorRegistry.java
Log:
EJBTHREE-1553: improved error message

Modified: projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/registry/InterceptorRegistry.java
===================================================================
--- projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/registry/InterceptorRegistry.java	2008-10-29 08:01:16 UTC (rev 80174)
+++ projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/registry/InterceptorRegistry.java	2008-10-29 08:25:22 UTC (rev 80175)
@@ -184,7 +184,13 @@
          {
             List<Class<?>> orderedInterceptorClasses = Arrays.asList(order.value());
             if(!orderedInterceptorClasses.containsAll(methodApplicableInterceptorClasses))
-               throw new IllegalStateException("EJB3 12.8.2 footnote 59: all applicable method interceptors must be listed in the interceptor order");
+            {
+               log.debug("applicable interceptors: " + methodApplicableInterceptorClasses);
+               log.debug("interceptor order: " + orderedInterceptorClasses);
+               List<Class<?>> subset = new ArrayList<Class<?>>(methodApplicableInterceptorClasses);
+               subset.removeAll(orderedInterceptorClasses);
+               throw new IllegalStateException("EJB3 12.8.2 footnote 59: all applicable method interceptors must be listed in the interceptor order for bean " + advisor.getName() + " method " + beanMethod + ", missing " + subset);
+            }
             methodApplicableInterceptorClasses = orderedInterceptorClasses;
          }
          applicableInterceptorClasses.put(beanMethod, methodApplicableInterceptorClasses);




More information about the jboss-cvs-commits mailing list