aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/patterns/HasMemberTypePattern.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/HasMemberTypePattern.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/HasMemberTypePattern.java
index 6aa55a45a..2b1f28fd4 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/HasMemberTypePattern.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/HasMemberTypePattern.java
@@ -87,11 +87,18 @@ public class HasMemberTypePattern extends TypePattern {
continue;
}
if (signaturePattern.matches(method, type.getWorld(), false)) {
- if (method.getDeclaringType().resolve(world) != type) {
+ ResolvedType declaringType = method.getDeclaringType().resolve(world);
+ if (declaringType != type) {
if (Modifier.isPrivate(method.getModifiers())) {
continue;
}
}
+ // J9: Object.finalize() is marked Deprecated it seems... triggers unhelpful messages
+ if (method.getName().equals("finalize") && declaringType.equals(ResolvedType.OBJECT)
+ && (signaturePattern.getAnnotationPattern() instanceof ExactAnnotationTypePattern)
+ && ((ExactAnnotationTypePattern)signaturePattern.getAnnotationPattern()).getAnnotationType().getSignature().equals("Ljava/lang/Deprecated;")) {
+ continue;
+ }
return true;
}
}