aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2009-11-12 22:14:58 +0000
committeraclement <aclement>2009-11-12 22:14:58 +0000
commitaab239a1c3e676882cbd9ce5401aecf6f4fdb103 (patch)
tree45e1d16b4fda1b44405049a48ffb01d898368d16
parent329b0e275f672bf6277d8957bd7aa57a95205cf3 (diff)
downloadaspectj-aab239a1c3e676882cbd9ce5401aecf6f4fdb103.tar.gz
aspectj-aab239a1c3e676882cbd9ce5401aecf6f4fdb103.zip
debug for resolved pointcut override detection
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
index d89de7197..1bd618c02 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
@@ -1691,7 +1691,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
sig = munger.getSignature(); // possibly changed when type parms filled in
if (sig.getKind() == Member.METHOD) {
- // OPTIMIZE can this be sped up?
+ // OPTIMIZE can this be sped up?
if (clashesWithExistingMember(munger, getMethods(true, false))) { // ITDs checked below
return;
}
@@ -2272,13 +2272,16 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
private void addPointcutsResolvingConflicts(List acc, List added, boolean isOverriding) {
for (Iterator i = added.iterator(); i.hasNext();) {
ResolvedPointcutDefinition toAdd = (ResolvedPointcutDefinition) i.next();
- // System.err.println("adding: " + toAdd);
for (Iterator j = acc.iterator(); j.hasNext();) {
ResolvedPointcutDefinition existing = (ResolvedPointcutDefinition) j.next();
if (existing == toAdd) {
continue;
}
- if (!isVisible(existing.getModifiers(), existing.getDeclaringType().resolve(getWorld()), this)) {
+ ResolvedType pointcutDeclaringType = existing.getDeclaringType().resolve(getWorld());
+ if (pointcutDeclaringType == null) {
+ throw new BCException("Pointcut declaring type is unexpectedly null. Pointcut is " + existing.toString());
+ }
+ if (!isVisible(existing.getModifiers(), pointcutDeclaringType, this)) {
// if they intended to override it but it is not visible,
// give them a nicer message
if (existing.isAbstract() && conflictingSignature(existing, toAdd)) {