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 48f5d57fb9d8ca27b11d41009c029ded16f8eb45 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Mar 31 15:33:40 2024 -0400 Reuse own ArrayUtils.nullToEmpty() --- src/main/java/org/apache/commons/lang3/ClassUtils.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/ClassUtils.java b/src/main/java/org/apache/commons/lang3/ClassUtils.java index 4efc2b016..58a2fd04d 100644 --- a/src/main/java/org/apache/commons/lang3/ClassUtils.java +++ b/src/main/java/org/apache/commons/lang3/ClassUtils.java @@ -1384,12 +1384,8 @@ public class ClassUtils { if (!ArrayUtils.isSameLength(classArray, toClassArray)) { return false; } - if (classArray == null) { - classArray = ArrayUtils.EMPTY_CLASS_ARRAY; - } - if (toClassArray == null) { - toClassArray = ArrayUtils.EMPTY_CLASS_ARRAY; - } + classArray = ArrayUtils.nullToEmpty(classArray); + toClassArray = ArrayUtils.nullToEmpty(toClassArray); for (int i = 0; i < classArray.length; i++) { if (!isAssignable(classArray[i], toClassArray[i], autoboxing)) { return false;