Author: sandygao
Date: Fri Nov  5 19:42:04 2010
New Revision: 1031746

URL: http://svn.apache.org/viewvc?rev=1031746&view=rev
Log:
Arrays.hashCode() wasn't available until Java 5.

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XS11CMRestriction.java

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XS11CMRestriction.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XS11CMRestriction.java?rev=1031746&r1=1031745&r2=1031746&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XS11CMRestriction.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/models/XS11CMRestriction.java
 Fri Nov  5 19:42:04 2010
@@ -854,7 +854,11 @@ public final class XS11CMRestriction imp
         }
         // Equal objects must have same hash code
         public int hashCode() {
-            return Arrays.hashCode(states);
+            int res = 0;
+            for (int i = 0; i < states.length; i++) {
+                res = res * 7 + states[i];
+            }
+            return res;
         }
         // it equals to another object if and only if they both have the same
         // base and derived states



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to