changeset 17950:b2d5b298ec6e

8015880: GenerateBreakIteratorData build warning Reviewed-by: peytoia
author alanb
date Wed, 05 Jun 2013 13:57:16 +0100
parents 6c33d8f2601e
children 2734e5252a38
files jdk/make/tools/src/build/tools/generatebreakiteratordata/CharSet.java
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/make/tools/src/build/tools/generatebreakiteratordata/CharSet.java	Fri May 31 10:53:19 2013 +0200
+++ b/jdk/make/tools/src/build/tools/generatebreakiteratordata/CharSet.java	Wed Jun 05 13:57:16 2013 +0100
@@ -39,6 +39,7 @@
 
 package build.tools.generatebreakiteratordata;
 
+import java.util.Arrays;
 import java.util.Hashtable;
 
 /**
@@ -701,7 +702,14 @@
      * the exact same characters as this one
      */
     public boolean equals(Object that) {
-        return (that instanceof CharSet) && chars.equals(((CharSet)that).chars);
+        return (that instanceof CharSet) && Arrays.equals(chars, ((CharSet)that).chars);
+    }
+
+    /**
+     * Returns the hash code for this set of characters
+     */
+    public int hashCode() {
+       return Arrays.hashCode(chars);
     }
 
     /**