This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git


The following commit(s) were added to refs/heads/master by this push:
     new e950e2c  Deprecate StringUtils.concatenate in favor of JDK String.join 
(#361)
e950e2c is described below

commit e950e2ce927f12bf14f36ca757ae336b1e981b01
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Sun Feb 1 20:04:53 2026 -0600

    Deprecate StringUtils.concatenate in favor of JDK String.join (#361)
    
    * Deprecate StringUtils.concatenate
---
 .../java/org/apache/maven/shared/utils/StringUtils.java    | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

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 1d046d3..0cd9e04 100644
--- a/src/main/java/org/apache/maven/shared/utils/StringUtils.java
+++ b/src/main/java/org/apache/maven/shared/utils/StringUtils.java
@@ -455,7 +455,7 @@ public class StringUtils {
      * @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
@@ -470,7 +470,7 @@ public class StringUtils {
      * @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
@@ -497,7 +497,7 @@ public class StringUtils {
      *                  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
@@ -550,7 +550,10 @@ public class StringUtils {
      *
      * @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, "");
@@ -566,7 +569,8 @@ public class StringUtils {
      * @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
@@ -597,7 +601,7 @@ public class StringUtils {
      * @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

Reply via email to