From ce96238b4eb02e5e98262d4c21291d9a381f96d5 Mon Sep 17 00:00:00 2001 From: Kenney Westerhof Date: Wed, 17 Jan 2007 23:06:03 +0000 Subject: [PATCH] Make it work for jre < 1.5 git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@497230 13f79535-47bb-0310-9956-ffa450edef68 --- .../integrationtests/AbstractMavenIntegrationTestCase.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/AbstractMavenIntegrationTestCase.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/AbstractMavenIntegrationTestCase.java index ecf1bbb5e9..8c21a1c81b 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/AbstractMavenIntegrationTestCase.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/AbstractMavenIntegrationTestCase.java @@ -14,7 +14,9 @@ public abstract class AbstractMavenIntegrationTestCase protected void runTest() throws Throwable { - String simpleName = getClass().getSimpleName(); + String simpleName = getClass().getName(); + int idx = simpleName.lastIndexOf( '.' ); + simpleName = idx >= 0 ? simpleName.substring( idx + 1 ) : simpleName; simpleName = simpleName.startsWith( "MavenIT" ) ? simpleName.substring( "MavenIT".length() ) : simpleName; simpleName = simpleName.endsWith( "Test" ) ? simpleName.substring( 0, simpleName.length() - 4 ) : simpleName;