From: aclement Date: Tue, 19 Feb 2008 22:41:26 +0000 (+0000) Subject: debug diagnostics for spring bug http://jira.springframework.org/browse/SPR-4390 X-Git-Tag: V1_6_0M2~52 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a22ad46047e2ddfa124c08621dd4bf567c8f23f1;p=aspectj.git debug diagnostics for spring bug http://jira.springframework.org/browse/SPR-4390 --- diff --git a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java index e87a89c43..cecf1c461 100644 --- a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java +++ b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java @@ -106,7 +106,11 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { org.aspectj.apache.bcel.classfile.annotation.Annotation[] anns = new org.aspectj.apache.bcel.classfile.annotation.Annotation[0]; if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); - anns = bcelMethod.getAnnotations(); + if (bcelMethod == null) { + System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); + } else { + anns = bcelMethod.getAnnotations(); + } } else if (onMember instanceof Constructor) { org.aspectj.apache.bcel.classfile.Method bcelCons = jc.getMethod((Constructor)onMember); anns = bcelCons.getAnnotations();