diff options
author | Andy Clement <aclement@gopivotal.com> | 2014-11-17 18:32:25 -0800 |
---|---|---|
committer | Andy Clement <aclement@gopivotal.com> | 2014-11-17 18:32:25 -0800 |
commit | ec91e93ac09fa9a347a8e8d0f99db3585dd93060 (patch) | |
tree | cb10973d67f2cf852ac4d4a0cea7546f1e5e2fd4 /org.aspectj.ajdt.core | |
parent | 934f0b86c5543737d4859131024cf73995fdc347 (diff) | |
download | aspectj-ec91e93ac09fa9a347a8e8d0f99db3585dd93060.tar.gz aspectj-ec91e93ac09fa9a347a8e8d0f99db3585dd93060.zip |
Further 451966: privileged aspect and ITDs
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties | 2 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties index 94637ffc6..94dd63e27 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties @@ -4,7 +4,7 @@ The -Xlintfile:lint.properties allows fine-grained control. In tools.jar, see org/aspectj/weaver/XlintDefault.properties for the default behavior and a template to copy. ### AspectJ-specific messages -compiler.name = AspectJ Compiler 1.8.4 +compiler.name = AspectJ Compiler 1.8.5 compiler.version = Eclipse Compiler BETA_JAVA8_2b07958, 3.11 compiler.copyright = diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java index 5d17dd357..953e7d9ee 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/InterTypeMethodBinding.java @@ -104,13 +104,25 @@ public class InterTypeMethodBinding extends MethodBinding { // it is a privileged aspect return true; } - + if (isProtected()) { throw new RuntimeException("unimplemented"); } // XXX make sure this walks correctly if (isPrivate()) { + // Possibly the call is made from an inner type within the privileged aspect + // TODO should check the first outer aspect we come across and stop at that point? + if (invocationType.isNestedType()) { + TypeBinding enclosingType = invocationType.enclosingType(); + while (enclosingType != null) { + if ((enclosingType instanceof SourceTypeBinding) && ((SourceTypeBinding)enclosingType).privilegedHandler != null) { + return true; + } + enclosingType = enclosingType.enclosingType(); + } + } + // answer true if the receiverType is the declaringClass // AND the invocationType and the declaringClass have a common enclosingType // if (receiverType != declaringClass) return false; |