Skip to content

[LANG-1820] updated the javadoc to reflect the actual behaviour of ObjectUtils.anyNull(Object) method#1621

Merged
garydgregory merged 1 commit intoapache:masterfrom
Partha-SUST16:LANG-1820
Mar 28, 2026
Merged

[LANG-1820] updated the javadoc to reflect the actual behaviour of ObjectUtils.anyNull(Object) method#1621
garydgregory merged 1 commit intoapache:masterfrom
Partha-SUST16:LANG-1820

Conversation

@Partha-SUST16
Copy link
Copy Markdown
Contributor

Fixed the javadoc described in the issue LANG_1820

The Javadoc for ObjectUtils.anyNull(Object...) incorrectly @param stated that true should be returned when the array is null or empty. However, the current implementation delegates to !allNotNull(values), and allNotNull() returns true for empty arrays, causing anyNull() to return false for empty arrays.

There already exists a test that verifies this behaviour located in org.apache.commons.lang3.ObjectUtilsTest.testAnyNull that anyNull returns false for empty array.
So updated the javadoc to reflect this behaviour.

@garydgregory garydgregory merged commit 1d25499 into apache:master Mar 28, 2026
21 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants