Skip to content

[LANG-1819] Javadoc ArrayUtils.removeAll() null input behavior#1614

Merged
garydgregory merged 3 commits intoapache:masterfrom
Partha-SUST16:LANG-1819
Mar 6, 2026
Merged

[LANG-1819] Javadoc ArrayUtils.removeAll() null input behavior#1614
garydgregory merged 3 commits intoapache:masterfrom
Partha-SUST16:LANG-1819

Conversation

@Partha-SUST16
Copy link
Contributor

LANG-1819: Fix ArrayUtils.removeAll() Javadoc for null array input

The Javadoc for all ArrayUtils.removeAll() overloads incorrectly stated
that passing a null array would throw an IndexOutOfBoundsException. The
actual implementation delegates to the generic removeAll(Object, int...)
overload, which returns null silently when the array is null.

As per the discussion on the issue report LANG-1819 the Javadoc has been updated across all primitive and Object overloads to accurately reflect the actual behavior — that null is returned when the input array is null.

…ion which returns null in case of null input
@Partha-SUST16 Partha-SUST16 changed the title updated the javadoc for Arrayutils.removeAll to match the implementation which returns null in case of null input LANG-1819: Fix ArrayUtils.removeAll() Javadoc for null array input Mar 5, 2026
Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Partha-SUST16

Please don't change the existing grammar or markup.

* @param indices the positions of the elements to be removed.
* @return A new array containing the existing elements except those at the specified positions.
* @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or null if the input array is null.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Partha-SUST16

Please don't change the existing grammar or markup.

Copy link
Contributor Author

@Partha-SUST16 Partha-SUST16 Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garydgregory updated the commit

@garydgregory garydgregory merged commit c28cc55 into apache:master Mar 6, 2026
59 of 68 checks passed
@garydgregory garydgregory changed the title LANG-1819: Fix ArrayUtils.removeAll() Javadoc for null array input [LANG-1819] Javadoc ArrayUtils.removeAll() null input behavior Mar 6, 2026
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