You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/05/29 08:46:44 UTC

[maven] branch MNG-7486 updated (fcd28dbed -> 3a817f9f1)

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

michaelo pushed a change to branch MNG-7486
in repository https://gitbox.apache.org/repos/asf/maven.git


 discard fcd28dbed Address comments
     new 3a817f9f1 Address comments

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (fcd28dbed)
            \
             N -- N -- N   refs/heads/MNG-7486 (3a817f9f1)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/maven/internal/MultilineMessageHelper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[maven] 01/01: Address comments

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-7486
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 3a817f9f1b20308389a5a757433991c34ca6b107
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat May 28 16:31:11 2022 +0200

    Address comments
---
 .../java/org/apache/maven/internal/MultilineMessageHelper.java | 10 +++++-----
 .../apache/maven/lifecycle/internal/builder/BuilderCommon.java |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/maven-core/src/main/java/org/apache/maven/internal/MultilineMessageHelper.java b/maven-core/src/main/java/org/apache/maven/internal/MultilineMessageHelper.java
index 9fd43252e..da158295b 100644
--- a/maven-core/src/main/java/org/apache/maven/internal/MultilineMessageHelper.java
+++ b/maven-core/src/main/java/org/apache/maven/internal/MultilineMessageHelper.java
@@ -41,7 +41,7 @@ public class MultilineMessageHelper
     public static List<String> format( String... lines )
     {
         int size = DEFAULT_MAX_SIZE;
-        int rem = size - 4; // 4 chars = 2 box_char + 2 spaces
+        int remainder = size - 4; // 4 chars = 2 box_char + 2 spaces
         List<String> result = new ArrayList<>();
         StringBuilder sb = new StringBuilder( size );
         // first line
@@ -52,12 +52,12 @@ public class MultilineMessageHelper
         for ( String line : lines )
         {
             sb.setLength( 0 );
-            String[] words = line.split( " " );
+            String[] words = line.split( "\\s+" );
             for ( String word : words )
             {
-                if ( sb.length() >= rem - word.length() - ( sb.length() > 0 ? 1 : 0 ) )
+                if ( sb.length() >= remainder - word.length() - ( sb.length() > 0 ? 1 : 0 ) )
                 {
-                    repeat( sb, ' ', rem - sb.length() );
+                    repeat( sb, ' ', remainder - sb.length() );
                     result.add( BOX_CHAR + " " + sb + " " + BOX_CHAR );
                     sb.setLength( 0 );
                 }
@@ -68,7 +68,7 @@ public class MultilineMessageHelper
                 sb.append( word );
             }
 
-            while ( sb.length() < rem )
+            while ( sb.length() < remainder )
             {
                 sb.append( ' ' );
             }
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java
index 52b05cb94..5415413af 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/BuilderCommon.java
@@ -144,7 +144,7 @@ public class BuilderCommon
             {
                 for ( String s : MultilineMessageHelper.format(
                         "Your build is requesting parallel execution, but this project contains the following "
-                                + "plugin(s) that have goals not marked as @threadSafe to support parallel execution.",
+                                + "plugin(s) that have goals not marked as thread-safe to support parallel execution.",
                         "While this /may/ work fine, please look for plugin updates and/or "
                                 + "request plugins be made thread-safe.",
                         "If reporting an issue, report it against the plugin in question, not against Apache Maven." ) )
@@ -154,7 +154,7 @@ public class BuilderCommon
                 if ( logger.isDebugEnabled() )
                 {
                     final Set<MojoDescriptor> unsafeGoals = executionPlan.getNonThreadSafeMojos();
-                    logger.warn( "The following goals are not marked as @threadSafe in " + project.getName() + ":" );
+                    logger.warn( "The following goals are not marked as thread-safe in " + project.getName() + ":" );
                     for ( MojoDescriptor unsafeGoal : unsafeGoals )
                     {
                         logger.warn( "  " + unsafeGoal.getId() );
@@ -162,14 +162,14 @@ public class BuilderCommon
                 }
                 else
                 {
-                    logger.warn( "The following plugins are not marked as @threadSafe in " + project.getName() + ":" );
+                    logger.warn( "The following plugins are not marked as thread-safe in " + project.getName() + ":" );
                     for ( Plugin unsafePlugin : unsafePlugins )
                     {
                         logger.warn( "  " + unsafePlugin.getId() );
                     }
                     logger.warn( "" );
                     logger.warn( "Enable verbose output (-X) to see precisely which goals are not marked as"
-                            + " @threadSafe." );
+                            + " thread-safe." );
                 }
                 logger.warn( MultilineMessageHelper.separatorLine() );
             }