diff options
author | aclement <aclement> | 2005-06-14 14:56:23 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-06-14 14:56:23 +0000 |
commit | 60efccceb5bb8e517570eb442f7b2c0152925c82 (patch) | |
tree | f0cae9b1fe6d8ee967b1679ffc64f655deb48454 | |
parent | 8ee1d11d49fdec1a98609c5a516c7797df0eaff5 (diff) | |
download | aspectj-60efccceb5bb8e517570eb442f7b2c0152925c82.tar.gz aspectj-60efccceb5bb8e517570eb442f7b2c0152925c82.zip |
Fix for 99089: [generics][itds] ArrayIndexOutOfBoundsException - Generics in privileged aspects. Correct handling for parameterized signatures.
-rw-r--r-- | weaver/src/org/aspectj/weaver/AjcMemberMaker.java | 3 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/Member.java | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java index a80e7e3a7..113c2e505 100644 --- a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java +++ b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java @@ -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), diff --git a/weaver/src/org/aspectj/weaver/Member.java b/weaver/src/org/aspectj/weaver/Member.java index 37aab9dc6..29f439203 100644 --- a/weaver/src/org/aspectj/weaver/Member.java +++ b/weaver/src/org/aspectj/weaver/Member.java @@ -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(); } |