diff --git a/src/main/java/org/apache/commons/lang3/BooleanUtils.java b/src/main/java/org/apache/commons/lang3/BooleanUtils.java index 8956bc3dd..374492387 100644 --- a/src/main/java/org/apache/commons/lang3/BooleanUtils.java +++ b/src/main/java/org/apache/commons/lang3/BooleanUtils.java @@ -887,7 +887,7 @@ public class BooleanUtils { * @throws IllegalArgumentException if array is null * @throws IllegalArgumentException if array is empty. */ - public static boolean xor(boolean[] array) { + public static boolean xor(boolean... array) { // Validates input if (array == null) { throw new IllegalArgumentException("The Array must not be null"); @@ -928,7 +928,7 @@ public class BooleanUtils { * @throws IllegalArgumentException if array is empty. * @throws IllegalArgumentException if array contains a null */ - public static Boolean xor(Boolean[] array) { + public static Boolean xor(Boolean... array) { if (array == null) { throw new IllegalArgumentException("The Array must not be null"); } else if (array.length == 0) { diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 3c7ef8767..f50133587 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -5761,7 +5761,7 @@ public class StringUtils { * @return the index where the strings begin to differ; -1 if they are all equal * @since 2.4 */ - public static int indexOfDifference(CharSequence[] css) { + public static int indexOfDifference(CharSequence... css) { if (css == null || css.length <= 1) { return INDEX_NOT_FOUND; } @@ -5852,7 +5852,7 @@ public class StringUtils { * or if there is no common prefix. * @since 2.4 */ - public static String getCommonPrefix(String[] strs) { + public static String getCommonPrefix(String... strs) { if (strs == null || strs.length == 0) { return EMPTY; } diff --git a/src/main/java/org/apache/commons/lang3/text/WordUtils.java b/src/main/java/org/apache/commons/lang3/text/WordUtils.java index ce7186d4f..d8e48a3e1 100644 --- a/src/main/java/org/apache/commons/lang3/text/WordUtils.java +++ b/src/main/java/org/apache/commons/lang3/text/WordUtils.java @@ -201,7 +201,7 @@ public class WordUtils { * @see #capitalizeFully(String) * @since 2.1 */ - public static String capitalize(String str, char[] delimiters) { + public static String capitalize(String str, char... delimiters) { int delimLen = (delimiters == null ? -1 : delimiters.length); if (str == null || str.length() == 0 || delimLen == 0) { return str; @@ -275,7 +275,7 @@ public class WordUtils { * @return capitalized String, null if null String input * @since 2.1 */ - public static String capitalizeFully(String str, char[] delimiters) { + public static String capitalizeFully(String str, char... delimiters) { int delimLen = (delimiters == null ? -1 : delimiters.length); if (str == null || str.length() == 0 || delimLen == 0) { return str; @@ -331,7 +331,7 @@ public class WordUtils { * @see #capitalize(String) * @since 2.1 */ - public static String uncapitalize(String str, char[] delimiters) { + public static String uncapitalize(String str, char... delimiters) { int delimLen = (delimiters == null ? -1 : delimiters.length); if (str == null || str.length() == 0 || delimLen == 0) { return str; @@ -464,7 +464,7 @@ public class WordUtils { * @see #initials(String) * @since 2.2 */ - public static String initials(String str, char[] delimiters) { + public static String initials(String str, char... delimiters) { if (str == null || str.length() == 0) { return str; }