From bed3f4e45a663bc7c366bea3c66e17b27d3410e2 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 24 Apr 2008 16:45:17 +0000 Subject: [PATCH] 228633: pointcut comparison changes in AST support --- .../org/eclipse/jdt/core/dom/AjASTMatcher.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java index 6e928d1fa..1c084ae4d 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java @@ -63,7 +63,10 @@ public class AjASTMatcher extends ASTMatcher { } public boolean match(DefaultPointcut node, Object other) { - return (other instanceof DefaultPointcut); + if (!(other instanceof DefaultPointcut)) { + return false; + } + return node.getDetail().equals(((DefaultPointcut) other).getDetail()); } public boolean match(ReferencePointcut node, Object other) { @@ -250,10 +253,16 @@ public class AjASTMatcher extends ASTMatcher { } public boolean match(DefaultTypePattern node, Object other) { - return (other instanceof DefaultTypePattern); + if (!(other instanceof DefaultTypePattern)) { + return false; + } + return node.getDetail().equals(((DefaultTypePattern) other).getDetail()); } public boolean match(SignaturePattern node, Object other) { - return (other instanceof SignaturePattern); + if (!(other instanceof SignaturePattern)) { + return false; + } + return node.getDetail().equals(((SignaturePattern) other).getDetail()); } } -- 2.39.5