You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/06/12 20:41:14 UTC
[commons-lang] branch master updated: [LANG-1569] Add
ArrayUtils.get(T[], index, T) to provide an out-of-bounds default value
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
The following commit(s) were added to refs/heads/master by this push:
new b241228 [LANG-1569] Add ArrayUtils.get(T[], index, T) to provide an out-of-bounds default value
b241228 is described below
commit b2412284a3f85b8d8602610d8b840bf65cdfe839
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 12 16:41:10 2020 -0400
[LANG-1569] Add ArrayUtils.get(T[], index, T) to provide an
out-of-bounds default value
---
src/main/java/org/apache/commons/lang3/ArrayUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
index 074341a..b89cd56 100644
--- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java
@@ -1678,7 +1678,7 @@ public class ArrayUtils {
* @return the nTh element of an array or a default value if the index is out of bounds.
* @since 3.11
*/
- public static <T> T get(final T[] array, final int index, T defaultValue) {
+ public static <T> T get(final T[] array, final int index, final T defaultValue) {
if (array == null) {
return defaultValue;
}