diff options
author | jhugunin <jhugunin> | 2003-03-12 23:22:11 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-03-12 23:22:11 +0000 |
commit | d5731957188b6280e850cf2bbc238469244b6d86 (patch) | |
tree | 7cd826b0dd91d579afc65da32de4e3b904acb25b | |
parent | 7746fcb7e977c7a91bd70081a2197a999ec18ad3 (diff) | |
download | aspectj-d5731957188b6280e850cf2bbc238469244b6d86.tar.gz aspectj-d5731957188b6280e850cf2bbc238469244b6d86.zip |
fixed for graceful error handling (i.e. the compiler doesn't dump stack ;-)
in response to tests now moved out of failing
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AccessForInlineVisitor.java | 1 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java | 2 | ||||
-rw-r--r-- | tests/ajcTests.xml | 14 | ||||
-rw-r--r-- | tests/ajcTestsFailing.xml | 14 | ||||
-rw-r--r-- | 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 @@ <compile files="CflowBindingOrig.java"/> <run class="CflowBindingOrig"/> </ajc-test> + + <ajc-test dir="errors" + title="type not imported in around advice"> + <compile files="TypeNotImportedInAroundCE.java"> + <message kind="error" line="10"/> + </compile> + </ajc-test> + + <ajc-test dir="errors" + title="type not imported in aspect"> + <compile files="TypeInAspectNotImportedCE.java"> + <message kind="error" line="6"/> + </compile> + </ajc-test> </suite> 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 @@ <run class="AspectInitError"/> </ajc-test> - <ajc-test dir="errors" - title="type not imported in around advice"> - <compile files="TypeNotImportedInAroundCE.java"> - <message kind="error" line="10"/> - </compile> - </ajc-test> - - <ajc-test dir="errors" - title="type not imported in aspect"> - <compile files="TypeInAspectNotImportedCE.java"> - <message kind="error" line="6"/> - </compile> - </ajc-test> - </suite> 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 @@ <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"> <suite> - <ajc-test dir="errors" - title="type not imported in around advice"> - <compile files="TypeNotImportedInAroundCE.java"> - <message kind="error" line="10"/> - </compile> - </ajc-test> - <ajc-test dir="errors" - title="type not imported in aspect"> - <compile files="TypeInAspectNotImportedCE.java"> - <message kind="error" line="6"/> - </compile> - </ajc-test> <!-- |