diff options
author | aclement <aclement> | 2004-08-05 09:25:04 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-08-05 09:25:04 +0000 |
commit | 81b5b1d6d34d5277d6595b5810300d6b8cd7f833 (patch) | |
tree | 495041ee641d78bf16959ba1209d36099f5e70e3 /weaver | |
parent | d8fa2e2f2706279779f3818b2af9825396f5e574 (diff) | |
download | aspectj-81b5b1d6d34d5277d6595b5810300d6b8cd7f833.tar.gz aspectj-81b5b1d6d34d5277d6595b5810300d6b8cd7f833.zip |
Fix for Bugzilla Bug 67591
invalid warning indicating no match when a match really occurs
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java index 9e33ee393..a5d1c42d2 100644 --- a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java @@ -335,15 +335,22 @@ public class WildTypePattern extends TypePattern { String cleanName = maybeGetCleanName(); String originalName = cleanName; + // if we discover it is 'MISSING' when searching via the scope, this next local var will + // tell us if it is really missing or if it does exist in the world and we just can't + // see it from the current scope. + ResolvedTypeX resolvedTypeInTheWorld = null; if (cleanName != null) { TypeX type; //System.out.println("resolve: " + cleanName); //??? this loop has too many inefficiencies to count + resolvedTypeInTheWorld = scope.getWorld().resolve(TypeX.forName(cleanName),true); while ((type = scope.lookupType(cleanName, this)) == ResolvedTypeX.MISSING) { int lastDot = cleanName.lastIndexOf('.'); if (lastDot == -1) break; cleanName = cleanName.substring(0, lastDot) + '$' + cleanName.substring(lastDot+1); + if (resolvedTypeInTheWorld == ResolvedTypeX.MISSING) + resolvedTypeInTheWorld = scope.getWorld().resolve(TypeX.forName(cleanName),true); } if (type == ResolvedTypeX.MISSING) { if (requireExactType) { @@ -356,7 +363,9 @@ public class WildTypePattern extends TypePattern { } return NO; } else if (scope.getWorld().getLint().invalidAbsoluteTypeName.isEnabled()) { - scope.getWorld().getLint().invalidAbsoluteTypeName.signal(originalName, getSourceLocation()); + // Only put the lint warning out if we can't find it in the world + if (resolvedTypeInTheWorld == ResolvedTypeX.MISSING) + scope.getWorld().getLint().invalidAbsoluteTypeName.signal(originalName, getSourceLocation()); } } else { if (dim != 0) type = TypeX.makeArray(type, dim); |