From 01dc8007ca9be0e0193666c078b1d0d0d9bf4118 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Sun, 21 Sep 2008 12:59:53 +0000 Subject: [PATCH] o Decoupled subclasses from maven-artifact git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@697502 13f79535-47bb-0310-9956-ffa450edef68 --- .../AbstractMavenIntegrationTestCase.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/its/core-integration-tests-support/maven-integration-test-helper/src/main/java/org/apache/maven/integrationtests/AbstractMavenIntegrationTestCase.java b/its/core-integration-tests-support/maven-integration-test-helper/src/main/java/org/apache/maven/integrationtests/AbstractMavenIntegrationTestCase.java index 05e9619906..844895a425 100644 --- a/its/core-integration-tests-support/maven-integration-test-helper/src/main/java/org/apache/maven/integrationtests/AbstractMavenIntegrationTestCase.java +++ b/its/core-integration-tests-support/maven-integration-test-helper/src/main/java/org/apache/maven/integrationtests/AbstractMavenIntegrationTestCase.java @@ -53,9 +53,15 @@ public abstract class AbstractMavenIntegrationTestCase } protected AbstractMavenIntegrationTestCase( String versionRangeStr ) - throws InvalidVersionSpecificationException { - versionRange = VersionRange.createFromVersionSpec( versionRangeStr ); + try + { + versionRange = VersionRange.createFromVersionSpec( versionRangeStr ); + } + catch ( InvalidVersionSpecificationException e) + { + throw (RuntimeException) new IllegalArgumentException( "Invalid version range: " + versionRangeStr ).initCause( e ); + } String v = System.getProperty( "maven.version" ); if ( v != null ) @@ -79,9 +85,15 @@ public abstract class AbstractMavenIntegrationTestCase * executing altogether if the wrong version is present. */ protected boolean matchesVersionRange( String versionRangeStr ) - throws InvalidVersionSpecificationException { - versionRange = VersionRange.createFromVersionSpec( versionRangeStr ); + try + { + versionRange = VersionRange.createFromVersionSpec( versionRangeStr ); + } + catch ( InvalidVersionSpecificationException e) + { + throw (RuntimeException) new IllegalArgumentException( "Invalid version range: " + versionRangeStr ).initCause( e ); + } String v = System.getProperty( "maven.version" ); if ( v != null )