From be2aca6940a820f96cfc4a6deeb7d4be5bba767d Mon Sep 17 00:00:00 2001 From: aclement Date: Sun, 25 Jun 2006 19:24:11 +0000 Subject: [PATCH] recognizes parameterized methods (fix for 148545) --- .../ajdt/internal/compiler/lookup/PrivilegedHandler.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/PrivilegedHandler.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/PrivilegedHandler.java index d9ac33d43..5bc5c1a2f 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/PrivilegedHandler.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/PrivilegedHandler.java @@ -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; -- 2.39.5