diff --git a/src/main/java/org/apache/maven/shared/utils/StringUtils.java b/src/main/java/org/apache/maven/shared/utils/StringUtils.java
index 224c4706..4f56e1bf 100644
--- a/src/main/java/org/apache/maven/shared/utils/StringUtils.java
+++ b/src/main/java/org/apache/maven/shared/utils/StringUtils.java
@@ -220,7 +220,9 @@ public static boolean isNotBlank( @Nullable String str )
* @return true
if the Strings are equal, case sensitive, or
* both null
* @see java.lang.String#equals(Object)
+ * @deprecated use {@code java.lang.Objects.equals()}
*/
+ @Deprecated
public static boolean equals( @Nullable String str1, @Nullable String str2 )
{
return ( str1 == null ? str2 == null : str1.equals( str2 ) );
@@ -315,7 +317,7 @@ public static int lastIndexOfAny( String str, String... searchStrs )
/**
*
Gets a substring from the specified string avoiding exceptions.
- * + * *A negative start position can be used to start n
* characters from the end of the String.
Gets a substring from the specified String avoiding exceptions.
- * + * *A negative start position can be used to start/end n
* characters from the end of the String.
Gets the leftmost n
characters of a String.
If n
characters are not available, or the
* String is null
, the String will be returned without
* an exception.
Gets the rightmost n
characters of a String.
If n
characters are not available, or the String
* is null
, the String will be returned without an
* exception.
Gets n
characters from the middle of a String.
If n
characters are not available, the remainder
* of the String will be returned without an exception. If the
* String is null
, null
will be returned.
Splits the provided text into a array, using whitespace as the * separator.
- * + * *The separator is not included in the returned String array.
* * @param str the String to parse @@ -516,9 +518,9 @@ public static String mid( String str, int pos, int len ) } /** - * @param text The text to be split. - * @param separator The separator at which the text will be split. - * @return The resulting array. + * @param text the text to be split + * @param separator the separator at which the text will be split + * @return the resulting array * @see #split(String, String, int) */ @Nonnull public static String[] split( @Nonnull String text, @Nullable String separator ) @@ -528,19 +530,19 @@ public static String mid( String str, int pos, int len ) /** *Splits the provided text into a array, based on a given separator.
- * + * *The separator is not included in the returned String array. The
* maximum number of splits to perform can be controlled. A null
* separator causes splitting on whitespace.
This is useful for quickly splitting a String into
* an array of tokens, instead of an enumeration of tokens (as
* StringTokenizer
does).
null
, splits on whitespace.
- * @param max The maximum number of elements to include in the
+ * @param max the maximum number of elements to include in the
* array. A zero or negative value implies no limit.
* @return an array of parsed Strings
*/
@@ -2375,11 +2377,10 @@ public static String escape( @Nullable String source, @Nonnull final char[] esca
}
/**
- * Remove all duplicate whitespace characters and line terminators are replaced with a single
- * space.
+ * Remove all duplicate whitespace characters and replace line terminators with a single space.
*
* @param s a not null String
- * @return a string with unique whitespace.
+ * @return a string with unique whitespace
*
*/
@Nonnull public static String removeDuplicateWhitespace( @Nonnull String s )