From 923c2265e677b997c3ad80d48dc78004a1313ff9 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 11 May 2006 07:27:45 +0000 Subject: [PATCH] 134471 - incremental structure model repair code overhaul - so we don't unnecessarily recompile if a decw changes. --- weaver/src/org/aspectj/weaver/Checker.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/Checker.java b/weaver/src/org/aspectj/weaver/Checker.java index f123ad36d..a3e2dac1b 100644 --- a/weaver/src/org/aspectj/weaver/Checker.java +++ b/weaver/src/org/aspectj/weaver/Checker.java @@ -101,6 +101,28 @@ public class Checker extends ShadowMunger { public boolean mustCheckExceptions() { return true; } + // XXX this perhaps ought to take account of the other fields in advice ... + public boolean equals(Object other) { + if (! (other instanceof Checker)) return false; + Checker o = (Checker) other; + return + o.isError == isError && + ((o.pointcut == null) ? (pointcut == null) : o.pointcut.equals(pointcut)) && + (World.compareLocations?((o.getSourceLocation()==null) ? (getSourceLocation()==null): o.getSourceLocation().equals(getSourceLocation())):true) // pr134471 - remove when handles are improved to be independent of location + ; + } + + private volatile int hashCode = -1; + public int hashCode() { + if (hashCode == -1) { + int result = 17; + result = 37*result + (isError?1:0); + result = 37*result + ((pointcut == null) ? 0 : pointcut.hashCode()); + hashCode = result; + } + return hashCode; + } + public boolean isError() { return isError; } -- 2.39.5