Skip to content

Commit 535855a

Browse files
authored
[SUREFIRE-2077] Allow consecutive spaces in argLine (#527)
* [SUREFIRE-2063] Allow consecutive spaces in argLine
1 parent 2cf4674 commit 535855a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private String interpolateArgLineWithPropertyExpressions()
253253
@Nonnull
254254
private static String stripWhitespace( @Nonnull String argLine )
255255
{
256-
return argLine.replaceAll( "\\s+", " " );
256+
return argLine.replaceAll( "\\s", " " );
257257
}
258258

259259
/**

maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/DefaultForkConfigurationTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ protected void resolveClasspath( @Nonnull Commandline cli,
248248
DefaultForkConfiguration mockedConfig = spy( config );
249249
String newArgLine = invokeMethod( mockedConfig, "newJvmArgLine", new Class[] { int.class }, 2 );
250250
verifyPrivate( mockedConfig, times( 1 ) ).invoke( "interpolateArgLineWithPropertyExpressions" );
251-
verifyPrivate( mockedConfig, times( 1 ) ).invoke( "extendJvmArgLine", eq( "a b" ) );
252-
assertThat( newArgLine ).isEqualTo( "a b" );
251+
verifyPrivate( mockedConfig, times( 1 ) ).invoke( "extendJvmArgLine", eq( "a b" ) );
252+
assertThat( newArgLine ).isEqualTo( "a b" );
253253
}
254254

255255
@Test

0 commit comments

Comments
 (0)