Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSHARED-1169] deprecate join methods now available in Java 8 String class #127

Merged
merged 1 commit into from
Dec 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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