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
commit a4cf528306f96784ed9c8e4cacb59e128fea92b3 Author: Gary Gregory <[email protected]> AuthorDate: Thu Jan 22 15:18:37 2026 -0500 Use a single return --- src/main/java/org/apache/commons/lang3/ArrayUtils.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java index 1ce0247ef..0c0000927 100644 --- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java +++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java @@ -9291,10 +9291,7 @@ public static String toString(final Object array) { * @return a String representation of the array. */ public static String toString(final Object array, final String stringIfNull) { - if (array == null) { - return stringIfNull; - } - return new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString(); + return array != null ? new ToStringBuilder(array, ToStringStyle.SIMPLE_STYLE).append(array).toString() : stringIfNull; } /**
