]> source.dussan.org Git - aspectj.git/commitdiff
recognizes parameterized methods (fix for 148545)
authoraclement <aclement>
Sun, 25 Jun 2006 19:24:11 +0000 (19:24 +0000)
committeraclement <aclement>
Sun, 25 Jun 2006 19:24:11 +0000 (19:24 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/PrivilegedHandler.java

index d9ac33d4340cb69616409f869282ed09e4b484d0..5bc5c1a2f876aa39d6d4c3bca3fd36117bdff212 100644 (file)
@@ -33,6 +33,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.IPrivilegedHandler;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding;
 import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 
 
@@ -57,7 +58,13 @@ public class PrivilegedHandler implements IPrivilegedHandler {
        public MethodBinding getPrivilegedAccessMethod(MethodBinding baseMethod, ASTNode location) {
                if (baseMethod.alwaysNeedsAccessMethod()) return baseMethod;
                
-               ResolvedMember key = inAspect.factory.makeResolvedMember(baseMethod);
+               ResolvedMember key = null;
+               
+               if (baseMethod instanceof ParameterizedMethodBinding) {
+                       key = inAspect.factory.makeResolvedMember(((ParameterizedMethodBinding)baseMethod).original());
+               } else {
+                       key = inAspect.factory.makeResolvedMember(baseMethod);
+               }
                if (accessors.containsKey(key)) return (MethodBinding)accessors.get(key);
                
                MethodBinding ret;