From a22ad46047e2ddfa124c08621dd4bf567c8f23f1 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 19 Feb 2008 22:41:26 +0000 Subject: [PATCH] debug diagnostics for spring bug http://jira.springframework.org/browse/SPR-4390 --- .../org/aspectj/weaver/reflect/Java15AnnotationFinder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); -- 2.39.5