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

[maven-surefire] branch master updated: [SUREFIRE-2077] Allow consecutive spaces in argLine (#527)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 535855a03 [SUREFIRE-2077] Allow consecutive spaces in argLine (#527)
535855a03 is described below

commit 535855a03dbd598f5c6fe806c7eacf599f1b4f4f
Author: Maarten Mulders <mt...@users.noreply.github.com>
AuthorDate: Wed May 25 23:12:39 2022 +0200

    [SUREFIRE-2077] Allow consecutive spaces in argLine (#527)
    
    * [SUREFIRE-2063] Allow consecutive spaces in argLine
---
 .../maven/plugin/surefire/booterclient/DefaultForkConfiguration.java  | 2 +-
 .../plugin/surefire/booterclient/DefaultForkConfigurationTest.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
index 8ffb868a0..b70abd75f 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java
@@ -253,7 +253,7 @@ public abstract class DefaultForkConfiguration
     @Nonnull
     private static String stripWhitespace( @Nonnull String argLine )
     {
-        return argLine.replaceAll( "\\s+", " " );
+        return argLine.replaceAll( "\\s", " " );
     }
 
     /**
diff --git a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
index 90c258d1b..ad668856e 100644
--- a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
+++ b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java
@@ -248,8 +248,8 @@ public class DefaultForkConfigurationTest
         DefaultForkConfiguration mockedConfig = spy( config );
         String newArgLine = invokeMethod( mockedConfig, "newJvmArgLine", new Class[] { int.class }, 2 );
         verifyPrivate( mockedConfig, times( 1 ) ).invoke( "interpolateArgLineWithPropertyExpressions" );
-        verifyPrivate( mockedConfig, times( 1 ) ).invoke( "extendJvmArgLine", eq( "a b" ) );
-        assertThat( newArgLine ).isEqualTo( "a b" );
+        verifyPrivate( mockedConfig, times( 1 ) ).invoke( "extendJvmArgLine", eq( "a  b" ) );
+        assertThat( newArgLine ).isEqualTo( "a  b" );
     }
 
     @Test