You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/06/13 12:46:37 UTC

[GitHub] [commons-lang] XenoAmess commented on a change in pull request #551: [LANG-1550] Optimize ArrayUtils::isArrayIndexValid method.

XenoAmess commented on a change in pull request #551:
URL: https://github.com/apache/commons-lang/pull/551#discussion_r439736670



##########
File path: src/main/java/org/apache/commons/lang3/ArrayUtils.java
##########
@@ -3110,19 +3110,22 @@ public static int indexOf(final short[] array, final short valueToFind, int star
     }
 
     /**
-     * Returns whether a given array can safely be accessed at the given index.
+     * <p>Returns whether a given array can safely be accessed at the given index.
+     *
+     * <pre>
+     * ArrayUtils.isArrayIndexValid(null, 0)       = false
+     * ArrayUtils.isArrayIndexValid([], 0)         = false
+     * ArrayUtils.isArrayIndexValid(["a"], 0)      = true
+     * </pre>

Review comment:
       @garydgregory 
   I think this is not a big problem, as most of the `</pre>` usage in this repo (especially in StringUtils) do it this way, means not closed at the end of the last line, but close at a new line.
   Should we arrange a fix for all of that usages?
   




----------------------------------------------------------------
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.

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