Skip to content

Commit

Permalink
deprecate join methods now available in Java 8 String class (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Dec 3, 2022
1 parent 2553265 commit 47fd7b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/apache/maven/shared/utils/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,9 @@ public static String mid( String str, int pos, int len )
* @param array the array of values to join together
* @param separator the separator character to use
* @return the joined String
* @deprecated use <code>java.lang.String.join(</code>) instead
*/
@Deprecated
@Nonnull public static String join( @Nonnull Object[] array, @Nullable String separator )
{
if ( separator == null )
Expand Down Expand Up @@ -650,7 +652,9 @@ public static String mid( String str, int pos, int len )
* @param iterator the <code>Iterator</code> of values to join together
* @param separator the separator character to use
* @return the joined String
* @deprecated use <code>java.lang.String.join(</code>) instead
*/
@Deprecated
@Nonnull public static String join( @Nonnull Iterator<?> iterator, String separator )
{
if ( separator == null )
Expand Down Expand Up @@ -689,7 +693,7 @@ public static String replaceOnce( @Nullable String text, char repl, char with )
}

/**
* <p>Replace all occurances of a char within another char.</p>
* <p>Replace all occurrences of a char within a string with another char.</p>
*
* <p>A <code>null</code> reference passed to this method is a no-op.</p>
*
Expand Down

0 comments on commit 47fd7b7

Please sign in to comment.