Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/main/java/org/apache/maven/shared/utils/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ public static String mid(String str, int pos, int len) {
* @param str the String to parse
* @return an array of parsed Strings
* @deprecated use <code>java.lang.String.split()</code> instead. Be careful when migrating.
* <code>String.split()</code>) splits on a regular expression so while it can
* <code>String.split()</code> splits on a regular expression so while it can
* do anything this method does, it is not a drop-in replacement.
*/
@NonNull
Expand All @@ -470,7 +470,7 @@ public static String[] split(@NonNull String str) {
* @return the resulting array
* @see #split(String, String, int)
* @deprecated use <code>java.lang.String.split()</code> instead. Be careful when migrating.
* <code>String.split()</code>) splits on a regular expression so while it can
* <code>String.split()</code> splits on a regular expression so while it can
* do anything this method does, it is not a drop-in replacement.
*/
@NonNull
Expand All @@ -497,7 +497,7 @@ public static String[] split(@NonNull String text, @Nullable String separator) {
* array. A zero or negative value implies no limit.
* @return an array of parsed Strings
* @deprecated use <code>java.lang.String.split()</code> instead. Be careful when migrating.
* <code>String.split()</code>) splits on a regular expression so while it can
* <code>String.split()</code> splits on a regular expression so while it can
* do anything this method does, it is not a drop-in replacement.
*/
@NonNull
Expand Down Expand Up @@ -550,7 +550,10 @@ public static String[] split(@NonNull String str, @Nullable String separator, in
*
* @param array the array of values to concatenate
* @return the concatenated string
* @deprecated use <code>java.lang.String.join()</code> or
* <code>Arrays.stream(array).map(Object::toString).collect(Collectors.joining(""))</code> instead
*/
@Deprecated
@NonNull
public static String concatenate(@NonNull Object... array) {
return join(array, "");
Expand All @@ -566,7 +569,8 @@ public static String concatenate(@NonNull Object... array) {
* @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 use <code>java.lang.String.join()</code> or
* <code>Arrays.stream(array).map(Object::toString).collect(Collectors.joining(separator))</code> instead
*/
@Deprecated
@NonNull
Expand Down Expand Up @@ -597,7 +601,7 @@ public static String join(@NonNull Object[] array, @Nullable String separator) {
* @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 use <code>java.lang.String.join()</code> instead
*/
@Deprecated
@NonNull
Expand Down
Loading