From 7b3134928cc1510172cbcb4693eb49e2f5d113a8 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 19 Aug 2008 23:14:31 +0000 Subject: [PATCH] 240693: test and fix: generic type defined inside around advice (mad) --- .../ajdt/internal/compiler/lookup/PrivilegedHandler.java | 6 +++++- 1 file changed, 5 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 cb48e9b85..84f7d37b0 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 @@ -25,6 +25,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.ParameterizedFieldBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; import org.aspectj.weaver.AjcMemberMaker; @@ -46,7 +47,10 @@ public class PrivilegedHandler implements IPrivilegedHandler { this.inAspect = inAspect; } - public FieldBinding getPrivilegedAccessField(FieldBinding baseField, ASTNode location) { + public FieldBinding getPrivilegedAccessField(FieldBinding baseField, ASTNode location) { + if (baseField instanceof ParameterizedFieldBinding) { + baseField = ((ParameterizedFieldBinding)baseField).originalField; + } ResolvedMember key = inAspect.factory.makeResolvedMember(baseField); if (accessors.containsKey(key)) return (FieldBinding)accessors.get(key); FieldBinding ret = new PrivilegedFieldBinding(inAspect, baseField); -- 2.39.5