This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 428698645 [LANG-1813] ArrayUtils#hashCode() Javadoc incorrectly states
“null returns zero” (actual result is 629)
428698645 is described below
commit 42869864586c8f420dcb0e54b449af39ca62f161
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Mar 20 10:35:57 2026 -0700
[LANG-1813] ArrayUtils#hashCode() Javadoc incorrectly states “null
returns zero” (actual result is 629)
---
src/changes/changes.xml | 1 +
src/main/java/org/apache/commons/lang3/ArrayUtils.java | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 454100c54..544c66e47 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -121,6 +121,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary
Gregory">CharSet now maintains iteration order.</action>
<action issue="LANG-771" type="fix" dev="ggregory" due-to="Ryan Holmes,
Makarand Hinge, Gary Gregory">DateUtils.ceiling does not behave correctly for
dates on the boundaries.</action>
<action issue="LANG-1819" type="fix" dev="ggregory" due-to="Partha Protim
Paul, Gary Gregory">[LANG-] Javadoc ArrayUtils.removeAll() null input behavior
#1614.</action>
+ <action issue="LANG-1813" type="fix" dev="ggregory" due-to="Ivan
Ponomarev, Gary Gregory">ArrayUtils#hashCode() Javadoc incorrectly states “null
returns zero” (actual result is 629).</action>
<!-- ADD -->
<action type="add" dev="ggregory" due-to="Gary
Gregory">Add JavaVersion.JAVA_27.</action>
<action type="add" dev="ggregory" due-to="Gary
Gregory">Add SystemUtils.IS_JAVA_27.</action>
diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
index aa47e4dab..3e95e7326 100644
--- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
@@ -2183,13 +2183,14 @@ public static int getLength(final Object array) {
}
/**
- * Gets a hash code for an array handling multidimensional arrays
correctly.
+ * Gets a hash code for an array handling multidimensional arrays.
* <p>
- * Multi-dimensional primitive arrays are also handled correctly by this
method.
+ * Multi-dimensional primitive arrays are also handled by this method.
* </p>
*
- * @param array the array to get a hash code for, {@code null} returns
zero.
+ * @param array the array to get a hash code for, may be {@code null}.
* @return a hash code for the array.
+ * @see HashCodeBuilder
*/
public static int hashCode(final Object array) {
return new HashCodeBuilder().append(array).toHashCode();