From ba9d43ccaf2660ddc9916ea48f79a77ba60d435e Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Fri, 15 Jun 2012 11:29:35 -0700 Subject: 382723 --- .../ajdt/internal/compiler/ast/AccessForInlineVisitor.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'org.aspectj.ajdt.core') diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AccessForInlineVisitor.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AccessForInlineVisitor.java index 91833c9e6..0755476e9 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AccessForInlineVisitor.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AccessForInlineVisitor.java @@ -40,6 +40,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.FieldBinding; 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.ParameterizedTypeBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ProblemFieldBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding; @@ -259,8 +260,16 @@ public class AccessForInlineVisitor extends ASTVisitor { return; // has already produced an error if (binding instanceof ReferenceBinding) { ReferenceBinding rb = (ReferenceBinding) binding; - if (!rb.isPublic()) + if (!rb.isPublic()) { + try { + if (rb instanceof ParameterizedTypeBinding) { + rb = (ReferenceBinding) rb.erasure(); + } + } catch (Throwable t) { // TODO remove post 1.7.0 + t.printStackTrace(); + } handler.notePrivilegedTypeAccess(rb, null); // ??? + } } else if (binding instanceof ArrayBinding) { makePublic(((ArrayBinding) binding).leafComponentType); } else { -- cgit v1.2.3