You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2007/05/21 12:37:59 UTC
svn commit: r540104 -
/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
Author: hindessm
Date: Mon May 21 03:37:47 2007
New Revision: 540104
URL: http://svn.apache.org/viewvc?view=rev&rev=540104
Log:
Applied patch from "[#HARMONY-3919][classlib][luni] Minor Javadoc change to java.util.Arrays".
Modified:
harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java?view=diff&rev=540104&r1=540103&r2=540104
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java Mon May 21 03:37:47 2007
@@ -1123,24 +1123,13 @@
}
/**
- * Answers a hash code based on the "deep contents" of the given array. If
- * the array contains other arrays as its elements, the hash code is based
- * on their contents not their identities. So It is not acceptable to invoke
- * this method on an array that contains itself as an element, either
- * directly or indirectly.
+ * Answers a hash code based on the deep contents of the given array. This
+ * means that if this array contains other arrays, their contents will also
+ * be included in the hash and so on recursively. This method should not be
+ * used if the array is likely to contain a reference to itself.
*
- * For any two arrays a and b, if Arrays.deepEquals(a, b) returns true, it
- * means that the return value of Arrays.deepHashCode(a) equals
- * Arrays.deepHashCode(b).
- *
- * The computation of the value returned by this method is similar to that
- * of the value returned by {@link List#hashCode()}} method invoked on a
- * {@link List}} containing a sequence of instances representing the
- * elements of array in the same order. The difference is: If an element e
- * of array is itself an array, its hash code is computed by calling the
- * appropriate overloading of Arrays.hashCode(e) if e is an array of a
- * primitive type, or by calling Arrays.deepHashCode(e) recursively if e is
- * an array of a reference type.
+ * If Arrays.deepEquals(...) returns true for two arrays then their deep
+ * hash codes will also be equal.
*
* The value returned by this method is the same value as the method
* Arrays.asList(array).hashCode(). If the array is null, the return value