[Jboss-cvs] JBossAS SVN: r55911 - branches/Branch_AOP_1_5/aop/src/main/org/jboss/aop/pointcut

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 14 15:23:55 EDT 2006


Author: kabir.khan at jboss.com
Date: 2006-08-14 15:23:53 -0400 (Mon, 14 Aug 2006)
New Revision: 55911

Modified:
   branches/Branch_AOP_1_5/aop/src/main/org/jboss/aop/pointcut/MatcherStrategy.java
Log:
[JBAOP-281] If an annotation is not on the classpath MatcherStrategy throws an exception

Modified: branches/Branch_AOP_1_5/aop/src/main/org/jboss/aop/pointcut/MatcherStrategy.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/main/org/jboss/aop/pointcut/MatcherStrategy.java	2006-08-14 19:20:02 UTC (rev 55910)
+++ branches/Branch_AOP_1_5/aop/src/main/org/jboss/aop/pointcut/MatcherStrategy.java	2006-08-14 19:23:53 UTC (rev 55911)
@@ -24,6 +24,7 @@
 import java.lang.reflect.Method;
 
 import org.jboss.aop.Advisor;
+import org.jboss.aop.AspectManager;
 import org.jboss.aop.annotation.AnnotationElement;
 import org.jboss.aop.pointcut.ast.ClassExpression;
 import org.jboss.aop.proxy.container.ClassProxyContainer;
@@ -66,7 +67,11 @@
          }
          catch (ClassNotFoundException e)
          {
-            throw new RuntimeException("Could not find interface for annotation " + sub);
+            if (AspectManager.verbose)
+            {
+               System.out.println("[warn] The annotation @" + sub + " referenced in one of your pointcut expressions can not be found");
+            }
+            return false;
          }
       }
       else if (instanceOf.matches(clazz.getName()))




More information about the jboss-cvs-commits mailing list