]> source.dussan.org Git - aspectj.git/commitdiff
Fix for 99089: [generics][itds] ArrayIndexOutOfBoundsException - Generics in privileg...
authoraclement <aclement>
Tue, 14 Jun 2005 14:56:23 +0000 (14:56 +0000)
committeraclement <aclement>
Tue, 14 Jun 2005 14:56:23 +0000 (14:56 +0000)
weaver/src/org/aspectj/weaver/AjcMemberMaker.java
weaver/src/org/aspectj/weaver/Member.java

index a80e7e3a7e139dd7bc807ca1b65ba5f7610e9b35..113c2e505db5927e586e04dff740a9ec974ad4db 100644 (file)
@@ -283,8 +283,7 @@ public class AjcMemberMaker {
        // -- privileged accessors
        
        public static ResolvedMember privilegedAccessMethodForMethod(TypeX aspectType, ResolvedMember method) {
-               String sig;
-               sig = method.getSignature();
+               String sig = method.getDeclaredSignature();
                return new ResolvedMember(Member.METHOD,
                        method.getDeclaringType(),
                        Modifier.PUBLIC | (method.isStatic() ? Modifier.STATIC : 0),
index 37aab9dc62ec2fa6f0c12431aaca2899c980e114..29f4392033a87fc1cdd95027ac131bd76f1a2018 100644 (file)
@@ -56,6 +56,7 @@ public class Member implements Comparable, AnnotatedElement {
             Object[] returnAndParams = signatureToTypes(signature,false);
             this.returnType = (TypeX) returnAndParams[0];
             this.parameterTypes = (TypeX[]) returnAndParams[1];
+                       signature = typesToSignature(returnType,parameterTypes,true);
         }
     }
 
@@ -75,10 +76,10 @@ public class Member implements Comparable, AnnotatedElement {
         this.name = name;
         this.parameterTypes = parameterTypes;
         if (kind == FIELD) {
-            this.signature = returnType.getRawTypeSignature();
+            this.signature         = returnType.getRawTypeSignature();
                        this.declaredSignature = returnType.getSignature();
         } else {
-            this.signature = typesToSignature(returnType, parameterTypes,true);
+            this.signature         = typesToSignature(returnType, parameterTypes,true);
                        this.declaredSignature = typesToSignature(returnType,parameterTypes,false);
         }
     }
@@ -111,7 +112,8 @@ public class Member implements Comparable, AnnotatedElement {
                        else                                                buf.append(paramTypes[i].getSignature());
         }
         buf.append(")");
-        buf.append(returnType.getSignature());
+        if (returnType.isParameterized() && useRawTypes) buf.append(returnType.getRawTypeSignature());
+        else                                                                                    buf.append(returnType.getSignature());
         return buf.toString();        
     }