From: aclement Date: Mon, 13 Feb 2006 10:51:24 +0000 (+0000) Subject: lessen the cost of hashcode and equals X-Git-Tag: POST_MEMORY_CHANGES~89 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=67ef5e265751297e19bed06372330dfc2124cd73;p=aspectj.git lessen the cost of hashcode and equals --- diff --git a/weaver/src/org/aspectj/weaver/patterns/NamePattern.java b/weaver/src/org/aspectj/weaver/patterns/NamePattern.java index 45f4b154a..abcceb841 100644 --- a/weaver/src/org/aspectj/weaver/patterns/NamePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/NamePattern.java @@ -21,6 +21,7 @@ import org.aspectj.weaver.VersionedDataInputStream; public class NamePattern extends PatternNode { char[] pattern; int starCount = 0; + private int hashcode = -1; public static final NamePattern ELLIPSIS = new NamePattern(""); public static final NamePattern ANY = new NamePattern("*"); @@ -35,6 +36,7 @@ public class NamePattern extends PatternNode { for (int i=0, len=pattern.length; i