This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
The following commit(s) were added to refs/heads/master by this push:
new d76e7f8 [MNG-6938] MavenITBootstrapTest fails with
StringIndexOutOfBoundsException: String index out of range: -1
d76e7f8 is described below
commit d76e7f870f1195b93f842791f6ff26f54ea0e02f
Author: Michael Osipov <[email protected]>
AuthorDate: Wed Jun 10 11:02:57 2020 +0200
[MNG-6938] MavenITBootstrapTest fails with StringIndexOutOfBoundsException:
String index out of range: -1
This is a regression introduced by 2c060ccf4912313eef65a5f6de0684efd7185979.
---
.../org/apache/maven/it/AbstractMavenIntegrationTestCase.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git
a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
index 592ad9e..17d4d3d 100644
---
a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
+++
b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
@@ -216,8 +216,15 @@ public abstract class AbstractMavenIntegrationTestCase
else
{
int index = testName.indexOf( ' ' );
- out.print( AnsiSupport.bold( testName.substring( 0, index ) ) );
- out.print( testName.substring( index ) );
+ if ( index == -1 )
+ {
+ out.print( testName );
+ }
+ else
+ {
+ out.print( AnsiSupport.bold( testName.substring( 0, index ) )
);
+ out.print( testName.substring( index ) );
+ }
out.print( '.' );
}