diff options
author | aclement <aclement> | 2008-02-26 21:03:19 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-02-26 21:03:19 +0000 |
commit | 9bbdb4128761575adb6e1c81e51b9c0bb1edb02a (patch) | |
tree | 8631b8111a1147985954c231f3eb38c5e3ff06b8 /weaver5 | |
parent | 5c79253a191046d074d9c893a1e7b50890f98890 (diff) | |
download | aspectj-9bbdb4128761575adb6e1c81e51b9c0bb1edb02a.tar.gz aspectj-9bbdb4128761575adb6e1c81e51b9c0bb1edb02a.zip |
stopgap for 220430V1_6_0M2
Diffstat (limited to 'weaver5')
-rw-r--r-- | weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java index ed12bbed0..fcdaf23f8 100644 --- a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java +++ b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15AnnotationFinder.java @@ -110,7 +110,8 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); if (bcelMethod == null) { - System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); + // pr220430 + //System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); } else { anns = bcelMethod.getAnnotations(); } @@ -143,8 +144,10 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { JavaClass jc = bcelRepository.loadClass(onMember.getDeclaringClass()); if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); + if (bcelMethod == null) { - System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); + // pr220430 +// System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); } else { Attribute[] attrs = bcelMethod.getAttributes(); for (int i = 0; i < attrs.length; i++) { @@ -175,7 +178,8 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); if (bcelMethod == null) { - System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); + // fallback on reflection - see pr220430 +// System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); } else { anns = bcelMethod.getAnnotations(); } @@ -284,7 +288,12 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { org.aspectj.apache.bcel.classfile.annotation.Annotation[][] anns = null; if (onMember instanceof Method) { org.aspectj.apache.bcel.classfile.Method bcelMethod = jc.getMethod((Method)onMember); - anns = bcelMethod.getParameterAnnotations(); + if (bcelMethod == null) { + // pr220430 + //System.err.println("Unexpected problem in Java15AnnotationFinder: cannot retrieve annotations on method '"+onMember.getName()+"' in class '"+jc.getClassName()+"'"); + } else { + anns = bcelMethod.getParameterAnnotations(); + } } else if (onMember instanceof Constructor) { org.aspectj.apache.bcel.classfile.Method bcelCons = jc.getMethod((Constructor)onMember); anns = bcelCons.getParameterAnnotations(); @@ -332,4 +341,5 @@ public class Java15AnnotationFinder implements AnnotationFinder, ArgNameFinder { } return result; } + } |