diff options
author | aclement <aclement> | 2009-09-23 16:18:29 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-09-23 16:18:29 +0000 |
commit | ede8a85199614e13e431721d4d90b602f0e116cb (patch) | |
tree | bffde9244589b2d4543cfd47234c922957cdca02 | |
parent | 646872fa7325c9720c02a5360ad07c0a991ce886 (diff) | |
download | aspectj-ede8a85199614e13e431721d4d90b602f0e116cb.tar.gz aspectj-ede8a85199614e13e431721d4d90b602f0e116cb.zip |
290227: fix and test
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java index f225f80b4..de58787b5 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ReferencePointcut.java @@ -151,8 +151,9 @@ public class ReferencePointcut extends Pointcut { if (pointcutDef == null && onType == null) { while (true) { UnresolvedType declaringType = searchType.getDeclaringType(); - if (declaringType == null) + if (declaringType == null) { break; + } searchType = declaringType.resolve(scope.getWorld()); pointcutDef = searchType.findPointcut(name); if (pointcutDef != null) { @@ -291,8 +292,9 @@ public class ReferencePointcut extends Pointcut { } - if (declaringType == null) + if (declaringType == null) { declaringType = searchStart; + } pointcutDec = declaringType.findPointcut(name); boolean foundMatchingPointcut = (pointcutDec != null && pointcutDec.isPrivate()); if (!foundMatchingPointcut) { @@ -323,8 +325,9 @@ public class ReferencePointcut extends Pointcut { IntMap newBindings = new IntMap(); for (int i = 0, len = arguments.size(); i < len; i++) { TypePattern p = arguments.get(i); - if (p == TypePattern.NO) + if (p == TypePattern.NO) { continue; + } // we are allowed to bind to pointcuts which use subtypes as this is type safe // this will be checked in ReferencePointcut.resolveBindings(). Can't check it here // as we don't know about any new parents added via decp. @@ -381,10 +384,12 @@ public class ReferencePointcut extends Pointcut { } public boolean equals(Object other) { - if (!(other instanceof ReferencePointcut)) + if (!(other instanceof ReferencePointcut)) { return false; - if (this == other) + } + if (this == other) { return true; + } ReferencePointcut o = (ReferencePointcut) other; return o.name.equals(name) && o.arguments.equals(arguments) && ((o.onType == null) ? (onType == null) : o.onType.equals(onType)); |