]> source.dussan.org Git - aspectj.git/commitdiff
235597: test and fix: annotations on generic methods
authoraclement <aclement>
Wed, 4 Jun 2008 17:21:13 +0000 (17:21 +0000)
committeraclement <aclement>
Wed, 4 Jun 2008 17:21:13 +0000 (17:21 +0000)
weaver/src/org/aspectj/weaver/ResolvedMemberImpl.java

index 7d3847d5819849727b7276f7f7322318c83a6e89..d40f00053535379265a2a7b07566d9e941c2047e 100644 (file)
@@ -299,6 +299,12 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno
        // that doesn't mean it is an error to call this method.
        // Normally the weaver will be working with subtypes of
        // this type - BcelField/BcelMethod
+       if (backingGenericMember != null) {
+               if (annotationTypes!=null) {
+                       throw new BCException("Unexpectedly found a backing generic member and a local set of annotations");
+               }
+               return backingGenericMember.getAnnotationTypes();
+       }
        if (annotationTypes == null) return null;
                return (ResolvedType[])annotationTypes.toArray(new ResolvedType[]{});
     }