diff options
author | Andy Clement <aclement@pivotal.io> | 2017-09-24 22:00:25 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2017-09-24 22:00:25 -0700 |
commit | ab8339852515f04236d41b9af486ea9f0c50c6c7 (patch) | |
tree | ec08d02f6cfa6d4a81fef919a750cb19aa3f4ca4 /org.aspectj.matcher | |
parent | ad514d54b1014bbfa085096419080c9fc6e1642b (diff) | |
download | aspectj-ab8339852515f04236d41b9af486ea9f0c50c6c7.tar.gz aspectj-ab8339852515f04236d41b9af486ea9f0c50c6c7.zip |
Various changes to get tests passing on 1.8 and 1.9
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/patterns/HasMemberTypePattern.java | 9 |
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; } } |