From d5731957188b6280e850cf2bbc238469244b6d86 Mon Sep 17 00:00:00 2001 From: jhugunin Date: Wed, 12 Mar 2003 23:22:11 +0000 Subject: [PATCH] fixed for graceful error handling (i.e. the compiler doesn't dump stack ;-) in response to tests now moved out of failing --- .../compiler/ast/AccessForInlineVisitor.java | 1 + .../compiler/ast/InterTypeFieldDeclaration.java | 2 +- tests/ajcTests.xml | 14 ++++++++++++++ tests/ajcTestsFailing.xml | 14 -------------- tests/jimTests.xml | 12 ------------ 5 files changed, 16 insertions(+), 27 deletions(-) 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 166a44cd8..3697f6be7 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 @@ -177,6 +177,7 @@ public class AccessForInlineVisitor extends AbstractSyntaxTreeVisitorAdapter { } private void makePublic(TypeBinding binding) { + if (binding == null || !binding.isValidBinding()) return; // has already produced an error if (binding instanceof ReferenceBinding) { ReferenceBinding rb = (ReferenceBinding)binding; if (!rb.isPublic()) handler.notePrivilegedTypeAccess(rb, null); //??? diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java index ef833b13e..2c45f3d1a 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java @@ -137,7 +137,7 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration { EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(classScope); resolveOnType(classScope); - if (classScope.referenceContext.binding == null) return null; + if (ignoreFurtherInvestigation) return null; binding = classScope.referenceContext.binding.resolveTypesFor(binding); if (ignoreFurtherInvestigation) return null; diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 40998854b..1e192ba8a 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -5697,4 +5697,18 @@ + + + + + + + + + + + + diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index 4f31f4087..578f0aa75 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -49,18 +49,4 @@ - - - - - - - - - - - - diff --git a/tests/jimTests.xml b/tests/jimTests.xml index c03e61f44..f4adb0f97 100644 --- a/tests/jimTests.xml +++ b/tests/jimTests.xml @@ -1,19 +1,7 @@ - - - - - - - - - -