You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "orionlibs (via GitHub)" <gi...@apache.org> on 2023/07/02 14:30:12 UTC

[GitHub] [commons-lang] orionlibs commented on a diff in pull request #1077: refactored ArrayUtils to reuse the getLength(Object array) method

orionlibs commented on code in PR #1077:
URL: https://github.com/apache/commons-lang/pull/1077#discussion_r1249553125


##########
src/main/java/org/apache/commons/lang3/ArrayUtils.java:
##########
@@ -655,7 +655,7 @@ private static Object add(final Object array, final int index, final Object elem
             Array.set(joinedArray, 0, element);
             return joinedArray;
         }
-        final int length = Array.getLength(array);
+        final int length = getLength(array);

Review Comment:
   just for code reuse. This class already has a getLength method. Why not reuse it inside this class? That was my thought. Not nulls. But it is OK. I will close it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org