From: aclement Date: Tue, 14 Jun 2005 14:56:23 +0000 (+0000) Subject: Fix for 99089: [generics][itds] ArrayIndexOutOfBoundsException - Generics in privileg... X-Git-Tag: PRE_ANDY~164 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=60efccceb5bb8e517570eb442f7b2c0152925c82;p=aspectj.git Fix for 99089: [generics][itds] ArrayIndexOutOfBoundsException - Generics in privileged aspects. Correct handling for parameterized signatures. --- 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(); }