From 77b6bb77219a4836eaa0bf9ff56ecf2502519e57 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Thu, 17 Oct 2013 19:34:21 +0000 Subject: [PATCH] ICU-10493 Added a stub implementation of hashCode() with assert false to make it consistent with equals() in SpoofChecker. X-SVN-Rev: 34579 --- .../core/src/com/ibm/icu/text/SpoofChecker.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java b/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java index d2a10e531f..24ffcf10a1 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java @@ -1753,7 +1753,9 @@ public class SpoofChecker { * @param other the SpoofChecker being compared with. * @return true if the two SpoofCheckers are equal. * @internal + * @deprecated This API is ICU internal only. */ + @Override public boolean equals(Object other) { if (!(other instanceof SpoofChecker)) {return false; } SpoofChecker otherSC = (SpoofChecker)other; @@ -1779,6 +1781,16 @@ public class SpoofChecker { return true; } + /** + * This is a stub implementation and not designed for generic use. + * @internal + * @deprecated This API is ICU internal only. + */ + @Override + public int hashCode() { + assert false; // To make sure ICU implementation does not depend on this. + return 1234; // Any arbitrary value - for now, using 1234. + } /* * Append the confusable skeleton transform for a single code point to a StringBuilder.