maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1051292 [1/2] - in /maven/surefire/trunk: ./ maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/ maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/ maven-surefire-report-plugin/src/main/java/org/apache/...
Date Mon, 20 Dec 2010 21:09:06 GMT
Author: krosenvold
Date: Mon Dec 20 21:09:04 2010
New Revision: 1051292

URL: http://svn.apache.org/viewvc?rev=1051292&view=rev
Log:
o Upadated surefire 2.7.1-SNAPSHOT to build with 2.7

Removed all dead code that had to be left in there because surefire cannot currently
be isolated from itself.

Added:
    maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java   (contents, props changed)
      - copied, changed from r1050729, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/PojoTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java   (contents, props changed)
      - copied, changed from r1050729, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/SurefireTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNgTestSuite.java   (contents, props changed)
      - copied, changed from r1050729, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/SurefireTestSuite.java
Removed:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/AbstractDirectoryTestSuite.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/SuiteDefinition.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/SurefireTestSuite.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/AbstractTestSet.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/PojoTestSet.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/SurefireConfigurationException.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/testset/SurefireTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitDirectoryTestSuite.java
    maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4DirectoryTestSuite.java
Modified:
    maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java
    maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireReportParameters.java
    maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
    maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
    maven/surefire/trunk/pom.xml
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/DirectoryScannerParametersAware.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ProviderPropertiesAware.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ReporterConfigurationAware.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireClassLoadersAware.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestArtifactInfoAware.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestRequestAware.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/providerapi/SurefireProvider.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetStatistics.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/SurefireReflectionException.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java
    maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java
    maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java
    maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SurefireReflectorTest.java
    maven/surefire/trunk/surefire-integration-tests/pom.xml
    maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java
    maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSet.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGProvider.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java

Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java (original)
+++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireExecutionParameters.java Mon Dec 20 21:09:04 2010
@@ -36,6 +36,7 @@ import java.util.Properties;
  * The parameters required to execute surefire.
  *
  * @author Stephen Connolly
+ * @noinspection UnusedDeclaration, UnusedDeclaration
  */
 public interface SurefireExecutionParameters
 {

Modified: maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireReportParameters.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireReportParameters.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireReportParameters.java (original)
+++ maven/surefire/trunk/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireReportParameters.java Mon Dec 20 21:09:04 2010
@@ -25,6 +25,7 @@ import java.io.File;
  * The parameters required to report on a surefire execution.
  *
  * @author Stephen Connolly
+ * @noinspection UnusedDeclaration
  */
 public interface SurefireReportParameters
 {

Modified: maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java (original)
+++ maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java Mon Dec 20 21:09:04 2010
@@ -556,6 +556,7 @@ public class SurefirePlugin
     /**
      * @parameter default-value="${session.parallel}"   '
      * @readonly
+     * @noinspection UnusedDeclaration
      */
     private Boolean parallelMavenExecution;
 
@@ -676,11 +677,13 @@ public class SurefirePlugin
         this.skipTests = skipTests;
     }
 
+    /** @noinspection deprecation*/
     public boolean isSkipExec()
     {
         return skipExec;
     }
 
+    /** @noinspection deprecation*/
     public void setSkipExec( boolean skipExec )
     {
         this.skipExec = skipExec;
@@ -836,11 +839,13 @@ public class SurefirePlugin
         this.localRepository = localRepository;
     }
 
+    /** @noinspection deprecation*/
     public Properties getSystemProperties()
     {
         return systemProperties;
     }
 
+    /** @noinspection deprecation*/
     public void setSystemProperties( Properties systemProperties )
     {
         this.systemProperties = systemProperties;

Modified: maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java (original)
+++ maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java Mon Dec 20 21:09:04 2010
@@ -48,8 +48,6 @@ public class SurefireReportParser
 
     private List testSuites = new ArrayList();
 
-    private Locale locale;
-
     private static final int PCENT = 100;
 
     public SurefireReportParser()
@@ -194,20 +192,9 @@ public class SurefireReportParser
 
     public final void setLocale( Locale locale )
     {
-        this.locale = locale;
         numberFormat = NumberFormat.getInstance( locale );
     }
 
-    public Locale getLocale()
-    {
-        return this.locale;
-    }
-
-    public void setNumberFormat( NumberFormat numberFormat )
-    {
-        this.numberFormat = numberFormat;
-    }
-
     public NumberFormat getNumberFormat()
     {
         return this.numberFormat;

Modified: maven/surefire/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/pom.xml?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/pom.xml (original)
+++ maven/surefire/trunk/pom.xml Mon Dec 20 21:09:04 2010
@@ -199,7 +199,7 @@
       <plugins>
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.5</version>
+          <version>2.7</version>
           <configuration>
             <!-- NOTE: Be sure to isolate the Surefire version under test from the version running the tests! -->
             <useSystemClassLoader>false</useSystemClassLoader>

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/Surefire.java Mon Dec 20 21:09:04 2010
@@ -19,200 +19,12 @@ package org.apache.maven.surefire;
  * under the License.
  */
 
-import org.apache.maven.surefire.report.ReporterException;
-import org.apache.maven.surefire.report.ReporterManagerFactory;
-import org.apache.maven.surefire.report.RunStatistics;
-import org.apache.maven.surefire.suite.SuiteDefinition;
-import org.apache.maven.surefire.suite.SurefireTestSuite;
-import org.apache.maven.surefire.testset.TestSetFailedException;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-
 /**
  * @author Jason van Zyl
  * @version $Id$
  */
-// todo: Remove once we build with 2.7
 public class Surefire
 {
-
-    private static final int SUCCESS = 0;
-
-    private static final int NO_TESTS = 254;
-
-    private static final int FAILURE = 255;
-
+    // todo: Move for 2.7.1
     public static final String SUREFIRE_BUNDLE_NAME = "org.apache.maven.surefire.surefire";
-
-    // DGF backwards compatibility
-    public boolean run( List reportDefinitions, Object[] testSuiteDefinition, String testSetName,
-                        ClassLoader surefireClassLoader, ClassLoader testsClassLoader )
-        throws ReporterException, TestSetFailedException
-    {
-        return run( reportDefinitions, testSuiteDefinition, testSetName, surefireClassLoader, testsClassLoader, null,
-                    Boolean.FALSE ) == 0;
-    }
-
-    public int run( List reportDefinitions, Object[] testSuiteDefinition, String testSetName,
-                    ClassLoader surefireClassLoader, ClassLoader testsClassLoader, Boolean failIfNoTests )
-        throws ReporterException, TestSetFailedException
-    {
-        return run( reportDefinitions, testSuiteDefinition, testSetName, surefireClassLoader, testsClassLoader, null,
-                    failIfNoTests );
-    }
-
-    // DGF backwards compatibility
-    public boolean run( List reportDefinitions, Object[] testSuiteDefinition, String testSetName,
-                        ClassLoader surefireClassLoader, ClassLoader testsClassLoader, Properties results )
-        throws ReporterException, TestSetFailedException
-    {
-        return run( reportDefinitions, testSuiteDefinition, testSetName, surefireClassLoader, testsClassLoader, results,
-                    Boolean.FALSE ) == 0;
-    }
-
-    public int run( List reportDefinitions, Object[] testSuiteDefinition, String testSetName,
-                    ClassLoader surefireClassLoader, ClassLoader testsClassLoader, Properties results,
-                    Boolean failIfNoTests )
-        throws ReporterException, TestSetFailedException
-    {
-        ReporterManagerFactory reporterManagerFactory =
-            new ReporterManagerFactory( reportDefinitions, surefireClassLoader );
-
-        SuiteDefinition suiteDefinition =
-            SuiteDefinition.fromBooterFormat( Collections.singletonList( testSuiteDefinition ) );
-
-        RunStatistics runStatistics = reporterManagerFactory.getGlobalRunStatistics();
-        if ( results != null )
-        {
-            runStatistics.initResultsFromProperties( results );
-        }
-
-        int totalTests = 0;
-
-        SurefireTestSuite suite = createSuiteFromDefinition( suiteDefinition, surefireClassLoader, testsClassLoader );
-
-        int testCount = suite.getNumTests();
-        if ( testCount > 0 )
-        {
-            totalTests += testCount;
-        }
-
-        if ( totalTests == 0 )
-        {
-            reporterManagerFactory.createReporterManager().writeMessage( "There are no tests to run." );
-        }
-        else
-        {
-            suite.execute( testSetName, reporterManagerFactory, testsClassLoader );
-        }
-
-        reporterManagerFactory.close();
-
-        if ( results != null )
-        {
-            runStatistics.updateResultsProperties( results );
-        }
-
-        if ( failIfNoTests.booleanValue() )
-        {
-            if ( runStatistics.getCompletedCount() == 0 )
-            {
-                return NO_TESTS;
-            }
-        }
-
-        return runStatistics.isProblemFree() ? SUCCESS : FAILURE;
-
-    }
-
-    public boolean run( List reportDefinitions, List testSuiteDefinitions, ClassLoader surefireClassLoader,
-                        ClassLoader testsClassLoader )
-        throws ReporterException, TestSetFailedException
-    {
-        return run( reportDefinitions, testSuiteDefinitions, surefireClassLoader, testsClassLoader, Boolean.FALSE )
-            == 0;
-    }
-
-    public int run( List reportDefinitions, List testSuiteDefinitions, ClassLoader surefireClassLoader,
-                    ClassLoader testsClassLoader, Boolean failIfNoTests )
-        throws ReporterException, TestSetFailedException
-    {
-        ReporterManagerFactory reporterManagerFactory =
-            new ReporterManagerFactory( reportDefinitions, surefireClassLoader );
-
-        RunStatistics runStatistics = reporterManagerFactory.getGlobalRunStatistics();
-
-        int totalTests = 0;
-        SuiteDefinition definition = SuiteDefinition.fromBooterFormat( testSuiteDefinitions );
-        SurefireTestSuite suite = createSuiteFromDefinition( definition, surefireClassLoader, testsClassLoader );
-
-        int testCount = suite.getNumTests();
-        if ( testCount > 0 )
-        {
-            totalTests += testCount;
-        }
-
-        if ( totalTests == 0 )
-        {
-            reporterManagerFactory.createReporterManager().writeMessage( "There are no tests to run." );
-        }
-        else
-        {
-            suite.execute( reporterManagerFactory, testsClassLoader );
-        }
-
-        reporterManagerFactory.close();
-        if ( failIfNoTests.booleanValue() )
-        {
-            if ( runStatistics.getCompletedCount() == 0 )
-            {
-                return NO_TESTS;
-            }
-        }
-
-        return runStatistics.isProblemFree() ? SUCCESS : FAILURE;
-    }
-
-    private SurefireTestSuite createSuiteFromDefinition( SuiteDefinition definition, ClassLoader surefireClassLoader,
-                                                         ClassLoader testsClassLoader )
-        throws TestSetFailedException
-    {
-        SurefireTestSuite suite = definition.newInstance( surefireClassLoader );
-
-        suite.locateTestSets( testsClassLoader );
-
-        // Todo: Make this not ugly OR just leave it here as a transitional feature for a few versions
-        // I will move this into the JUnit4DirectoryTestSuite when fixing SUREFIRE-141 RSN
-        // SUREFIRE-141 will require loosening the relationship between surefire and the providers,
-        // which is basically way too constrained and locked into a design that is only correct for
-        // junit3 with the AbstractDirectoryTestSuite.
-        // This same constraint is making it hard to put this code in the proper place.
-        if ( isJunit4UpgradeCheck() && suite.getClassesSkippedByValidation().size() > 0 &&
-            suite.getClass().getName().equals( "org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite" ) )
-        {
-
-            StringBuilder reason = new StringBuilder();
-            reason.append( "Updated check failed\n" );
-            reason.append( "There are tests that would be run with junit4 / surefire 2.6 but not with [2.7,):\n" );
-            for ( Iterator i = suite.getClassesSkippedByValidation().iterator(); i.hasNext(); )
-            {
-                Class testClass = (Class) i.next();
-                reason.append( "   " );
-                reason.append( testClass.getCanonicalName() );
-                reason.append( "\n" );
-            }
-            throw new TestSetFailedException( reason.toString() );
-        }
-
-        return suite;
-    }
-
-    private boolean isJunit4UpgradeCheck()
-    {
-        final String property = System.getProperty( "surefire.junit4.upgradecheck" );
-        return property != null;
-    }
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/DirectoryScannerParametersAware.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/DirectoryScannerParametersAware.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/DirectoryScannerParametersAware.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/DirectoryScannerParametersAware.java Mon Dec 20 21:09:04 2010
@@ -23,6 +23,7 @@ import org.apache.maven.surefire.testset
 
 /**
  * @author Kristian Rosenvold
+ * @noinspection UnusedDeclaration
  */
 interface DirectoryScannerParametersAware
 {

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ProviderPropertiesAware.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ProviderPropertiesAware.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ProviderPropertiesAware.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ProviderPropertiesAware.java Mon Dec 20 21:09:04 2010
@@ -23,9 +23,9 @@ import java.util.Properties;
 
 /**
  * @author Kristian Rosenvold
+ * @noinspection UnusedDeclaration
  */
 interface ProviderPropertiesAware
 {
-    /** @noinspection UnusedDeclaration*/
     void setProviderProperties( Properties providerProperties );
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ReporterConfigurationAware.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ReporterConfigurationAware.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ReporterConfigurationAware.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/ReporterConfigurationAware.java Mon Dec 20 21:09:04 2010
@@ -23,9 +23,9 @@ import org.apache.maven.surefire.report.
 
 /**
  * @author Kristian Rosenvold
+ * @noinspection UnusedDeclaration
  */
 interface ReporterConfigurationAware
 {
-    /** @noinspection UnusedDeclaration*/
     void setReporterConfiguration( ReporterConfiguration reporterConfiguration );
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireClassLoadersAware.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireClassLoadersAware.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireClassLoadersAware.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireClassLoadersAware.java Mon Dec 20 21:09:04 2010
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.booter
 
 /**
  * @author Kristian Rosenvold
+ * @noinspection UnusedDeclaration
  */
 public interface SurefireClassLoadersAware
 {

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/SurefireReflector.java Mon Dec 20 21:09:04 2010
@@ -198,20 +198,14 @@ public class SurefireReflector
                                                   booterParameters );
     }
 
-
     public void setIfDirScannerAware( Object o, DirectoryScannerParameters dirScannerParams )
     {
-        if ( isDirectoryScannerParameterAware( o ) )
+        if ( directoryScannerParametersAware.isAssignableFrom( o.getClass() ) )
         {
             setDirectoryScannerParameters( o, dirScannerParams );
         }
     }
 
-    boolean isDirectoryScannerParameterAware( Object o )
-    {
-        return directoryScannerParametersAware.isAssignableFrom( o.getClass() );
-    }
-
     public void setDirectoryScannerParameters( Object o, DirectoryScannerParameters dirScannerParams )
     {
         final Object param = createDirectoryScannerParameters( dirScannerParams );
@@ -220,18 +214,12 @@ public class SurefireReflector
 
     public void setTestSuiteDefinitionAware( Object o, TestRequest testSuiteDefinition2 )
     {
-        if ( isTestSuiteDefinitionAware( o ) )
+        if ( testSuiteDefinitionAware.isAssignableFrom( o.getClass() ) )
         {
             setTestSuiteDefinition( o, testSuiteDefinition2 );
         }
     }
 
-
-    boolean isTestSuiteDefinitionAware( Object o )
-    {
-        return testSuiteDefinitionAware.isAssignableFrom( o.getClass() );
-    }
-
     void setTestSuiteDefinition( Object o, TestRequest testSuiteDefinition1 )
     {
         final Object param = createTestRequest( testSuiteDefinition1 );
@@ -240,18 +228,12 @@ public class SurefireReflector
 
     public void setProviderPropertiesAware( Object o, Properties properties )
     {
-        if ( isProviderPropertiesAware( o ) )
+        if ( providerPropertiesAware.isAssignableFrom( o.getClass() ) )
         {
             setProviderProperties( o, properties );
         }
     }
 
-
-    boolean isProviderPropertiesAware( Object o )
-    {
-        return providerPropertiesAware.isAssignableFrom( o.getClass() );
-    }
-
     void setProviderProperties( Object o, Properties providerProperties )
     {
         ReflectionUtils.invokeSetter( o, "setProviderProperties", Properties.class, providerProperties );
@@ -259,7 +241,7 @@ public class SurefireReflector
 
     public void setReporterConfigurationAware( Object o, ReporterConfiguration reporterConfiguration1 )
     {
-        if ( isReporterConfigurationAwareAware( o ) )
+        if ( reporterConfigurationAware.isAssignableFrom( o.getClass() ) )
         {
             setReporterConfiguration( o, reporterConfiguration1 );
         }
@@ -272,24 +254,14 @@ public class SurefireReflector
         ReflectionUtils.invokeSetter( o, "setReporterConfiguration", this.reporterConfiguration, param );
     }
 
-    boolean isReporterConfigurationAwareAware( Object o )
-    {
-        return reporterConfigurationAware.isAssignableFrom( o.getClass() );
-    }
-
     public void setTestClassLoaderAware( Object o, ClassLoader surefireClassLoader, ClassLoader testClassLoader )
     {
-        if ( isTestClassLoaderAware( o ) )
+        if ( testClassLoaderAware.isAssignableFrom( o.getClass() ) )
         {
             setTestClassLoader( o, surefireClassLoader, testClassLoader );
         }
     }
 
-    boolean isTestClassLoaderAware( Object o )
-    {
-        return testClassLoaderAware.isAssignableFrom( o.getClass() );
-    }
-
     void setTestClassLoader( Object o, ClassLoader surefireClassLoader, ClassLoader testClassLoader )
     {
         final Method setter = ReflectionUtils.getMethod( o, "setClassLoaders",
@@ -299,24 +271,19 @@ public class SurefireReflector
 
     public void setTestArtifactInfoAware( Object o, TestArtifactInfo testArtifactInfo1 )
     {
-        if ( isTestArtifactInfoAware( o ) )
+        if ( testArtifactInfoAware.isAssignableFrom( o.getClass() ) )
         {
             setTestArtifactInfo( o, testArtifactInfo1 );
         }
     }
 
-    public boolean isTestArtifactInfoAware( Object o )
-    {
-        return testArtifactInfoAware.isAssignableFrom( o.getClass() );
-    }
-
     void setTestArtifactInfo( Object o, TestArtifactInfo testArtifactInfo )
     {
         final Object param = createTestArtifactInfo( testArtifactInfo );
         ReflectionUtils.invokeSetter( o, "setTestArtifactInfo", this.testArtifactInfo, param );
     }
 
-    public boolean isRunResult( Object o )
+    private boolean isRunResult( Object o )
     {
         return runResult.isAssignableFrom( o.getClass() );
     }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestArtifactInfoAware.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestArtifactInfoAware.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestArtifactInfoAware.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestArtifactInfoAware.java Mon Dec 20 21:09:04 2010
@@ -23,9 +23,9 @@ import org.apache.maven.surefire.testset
 
 /**
  * @author Kristian Rosenvold
+ * @noinspection UnusedDeclaration
  */
 interface TestArtifactInfoAware
 {
-    /** @noinspection UnusedDeclaration*/
     void setTestArtifactInfo( TestArtifactInfo testArtifactInfo );
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestRequestAware.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestRequestAware.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestRequestAware.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/booter/TestRequestAware.java Mon Dec 20 21:09:04 2010
@@ -23,9 +23,9 @@ import org.apache.maven.surefire.testset
 
 /**
  * @author Kristian Rosenvold
+ * @noinspection UnusedDeclaration
  */
 interface TestRequestAware
 {
-    /** @noinspection UnusedDeclaration*/
     void setTestRequest( TestRequest testSuiteDefinition );
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/providerapi/SurefireProvider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/providerapi/SurefireProvider.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/providerapi/SurefireProvider.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/providerapi/SurefireProvider.java Mon Dec 20 21:09:04 2010
@@ -47,7 +47,7 @@ public interface SurefireProvider
     /**
      * Called when forkmode is pertest, allows the provider to define what "pertest" will be.
      *
-     * @return
+     * @return An iterator that will trigger one fork per item
      */
     Iterator getSuites();
 
@@ -55,6 +55,10 @@ public interface SurefireProvider
      * The test that will be invoked through a fork; used only for forkmode=pertest, when the classpath
      * scanning happens on the plugin-side. When this is set, the forked process will run only that test
      * and not scan the classpath
+     * @param forkTestSet An item from the iterator in #getSuites
+     * @return A result of the invocation
+     * @throws org.apache.maven.surefire.report.ReporterException      When reporting fails
+     * @throws org.apache.maven.surefire.testset.TestSetFailedException  When testset fails
      */
 
     RunResult invoke( Object forkTestSet )

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java Mon Dec 20 21:09:04 2010
@@ -50,16 +50,6 @@ public abstract class AbstractConsoleRep
                format, reporterConfiguration );
     }
 
-    /**
-     * @deprecated Can be removed once we build surefire with 2.7
-     */
-    protected AbstractConsoleReporter( String format, Boolean trimStackTrace )
-    {
-        // TODO: use logger
-        super( new PrintWriter( new OutputStreamWriter( new BufferedOutputStream( ORIGINAL_SYSTEM_OUT, BUFFER_SIZE ) ) ),
-               format, trimStackTrace );
-    }
-
     public void testSetStarting( ReportEntry report )
         throws ReporterException
     {
@@ -82,33 +72,12 @@ public abstract class AbstractConsoleRep
         writer.flush();
     }
 
-    public void runAborted( ReportEntry report )
-    {
-        printAbortionError( "RUN ABORTED", report );
-    }
-
-    public void testSetAborted( ReportEntry report )
-    {
-        printAbortionError( "TEST SET ABORTED", report );
-    }
-
-    private void printAbortionError( String msg, ReportEntry report )
-    {
-        writer.println( msg );
-        writer.println( report.getSourceName() );
-        writer.println( report.getName() );
-        writer.println( report.getMessage() );
-        writer.println( getStackTrace( report ) );
-        writer.flush();
-    }
-
     /**
      * Get the test set starting message for a report.
      * eg. "Running org.foo.BarTest ( of group )"
      *
      * @param report report whose test set is starting
      * @return the message
-     * @todo internationalize
      */
     public static String getTestSetStartingMessage( ReportEntry report )
     {
@@ -129,7 +98,7 @@ public abstract class AbstractConsoleRep
      * Parses a Surefire test set starting message into a {@link ReportEntry} object.
      * Only name and group will be set if applicable.
      *
-     * @param message
+     * @param message The test starting message
      * @return the parsed {@link ReportEntry}
      */
     public static ReportEntry parseTestSetStartingMessage( String message )

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractFileReporter.java Mon Dec 20 21:09:04 2010
@@ -41,14 +41,6 @@ public abstract class AbstractFileReport
         this.reportsDirectory = reporterConfiguration.getReportsDirectory();
     }
 
-    /** @deprecated Can be removed once we build surfire with 2.7 */
-    protected AbstractFileReporter( File reportsDirectory, String format, Boolean trimStackTrace )
-    {
-        super( format, trimStackTrace );
-
-        this.reportsDirectory = reportsDirectory;
-    }
-
 
     public void testSetStarting( ReportEntry report )
         throws ReporterException
@@ -59,6 +51,7 @@ public abstract class AbstractFileReport
 
         File reportDir = reportFile.getParentFile();
 
+        //noinspection ResultOfMethodCallIgnored
         reportDir.mkdirs();
 
         try

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractTextReporter.java Mon Dec 20 21:09:04 2010
@@ -53,28 +53,6 @@ public abstract class AbstractTextReport
         this.format = format;
     }
 
-    /**
-     * @deprecated Can be removed once we build Surefire with 2.7
-     */
-    protected AbstractTextReporter( String format, Boolean trimStackTrace )
-    {
-        super( trimStackTrace );
-
-        this.format = format;
-    }
-
-    /**
-     * @deprecated Can be removed once we build Surefire with 2.7
-     */
-    protected AbstractTextReporter( PrintWriter writer, String format, Boolean trimStackTrace )
-    {
-        super( trimStackTrace );
-
-        this.writer = writer;
-
-        this.format = format;
-    }
-
 
     protected AbstractTextReporter( PrintWriter writer, String format, ReporterConfiguration reporterConfiguration )
     {

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefConsoleReporter.java Mon Dec 20 21:09:04 2010
@@ -33,10 +33,4 @@ public class BriefConsoleReporter
     {
         super( BRIEF, reporterConfiguration );
     }
-
-    /** @deprecated Can be removed once we build Surefire with 2.7 */
-    public BriefConsoleReporter( Boolean trimStackTrace )
-    {
-        super( BRIEF, trimStackTrace );
-    }
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/BriefFileReporter.java Mon Dec 20 21:09:04 2010
@@ -19,8 +19,6 @@ package org.apache.maven.surefire.report
  * under the License.
  */
 
-import java.io.File;
-
 /**
  * Brief format file reporter.
  *
@@ -35,14 +33,6 @@ public class BriefFileReporter
         super( reporterConfiguration, BRIEF );
     }
 
-    /**
-     * @deprecated Can be removed once we build Surefire with 2.7
-     */
-    public BriefFileReporter( File reportsDirectory, Boolean trimStackTrace )
-    {
-        super( reportsDirectory, BRIEF, trimStackTrace );
-    }
-
     public void writeDetailMessage( String message )
     {
     }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ConsoleReporter.java Mon Dec 20 21:09:04 2010
@@ -33,9 +33,4 @@ public class ConsoleReporter
         super( SUMMARY, reporterConfiguration );
     }
 
-    /** @deprecated Can be removed once we build Surefire with 2.7 */
-    public ConsoleReporter( Boolean trimStackTrace )
-    {
-        super( SUMMARY, trimStackTrace );
-    }
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java Mon Dec 20 21:09:04 2010
@@ -23,36 +23,185 @@ package org.apache.maven.surefire.report
  * @author Kristian Rosenvold
  */
 public class DefaultReportEntry
-    extends ReportEntry
+    implements ReportEntry
 {
+    private final String source;
+
+    private final String name;
+
+    private final String group;
+
+    private final String message;
+
+    private final StackTraceWriter stackTraceWriter;
+
+    private final Integer elapsed;
+
+    protected DefaultReportEntry( String name, String group )
+    {
+        this.name = name;
+        this.group = group;
+        this.stackTraceWriter = null;
+        this.elapsed = null;
+        this.message = null;
+        this.source = null;
+    }
+
     public DefaultReportEntry( String source, String name, String message )
     {
-        super( source, name, null, message, null );
+        this( source, name, null, message, null, null );
     }
 
-    public DefaultReportEntry( String source, String name, String message, Integer elapsed )
+    public DefaultReportEntry( String source, String name, String message, StackTraceWriter stackTraceWriter )
     {
-        super( source, name, null, message, null, elapsed );
+        this( source, name, null, message, stackTraceWriter, null );
     }
 
-    public DefaultReportEntry( String source, String name, String group, String message )
+    public DefaultReportEntry( String source, String name, String group, String message, StackTraceWriter stackTraceWriter )
     {
-        super( source, name, group, message, null, null );
+        this( source, name, group, message, stackTraceWriter, null );
     }
 
-    public DefaultReportEntry( String source, String name, String message, StackTraceWriter stackTraceWriter )
+    public DefaultReportEntry( String source, String name, String group, String message, StackTraceWriter stackTraceWriter,
+                        Integer elapsed )
+    {
+        if ( source == null )
+        {
+            throw new NullPointerException( "source is null" );
+        }
+        if ( name == null )
+        {
+            throw new NullPointerException( "name is null" );
+        }
+        if ( message == null )
+        {
+            throw new NullPointerException( "message is null" );
+        }
+
+        this.source = source;
+
+        this.name = name;
+
+        this.group = group;
+
+        this.message = message;
+
+        this.stackTraceWriter = stackTraceWriter;
+
+        this.elapsed = elapsed;
+    }
+
+    public String getSourceName()
     {
-        super( source, name, null, message, stackTraceWriter );
+        return source;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public String getGroup()
+    {
+        return group;
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public StackTraceWriter getStackTraceWriter()
+    {
+        return stackTraceWriter;
+    }
+
+    public Integer getElapsed()
+    {
+        return elapsed;
+    }
+
+    public String toString()
+    {
+        return "ReportEntry{" + "source='" + source + '\'' + ", name='" + name + '\'' + ", group='" + group + '\'' +
+            ", message='" + message + '\'' + ", stackTraceWriter=" + stackTraceWriter + ", elapsed=" + elapsed + '}';
+    }
+
+    public DefaultReportEntry( String source, String name, String message, Integer elapsed )
+    {
+        this( source, name, null, message, null, elapsed );
+    }
+
+    public DefaultReportEntry( String source, String name, String group, String message )
+    {
+        this( source, name, group, message, null, null );
     }
 
     public DefaultReportEntry( String source, String name, String message, StackTraceWriter stackTraceWriter,
                                Integer elapsed )
     {
-        super( source, name, null, message, stackTraceWriter, elapsed );
+        this( source, name, null, message, stackTraceWriter, elapsed );
     }
 
     public static ReportEntry nameGroup( String name, String group )
     {
-        return new ReportEntry( name, group );
+        return new DefaultReportEntry( name, group );
+    }
+
+    /** @noinspection RedundantIfStatement*/
+    public boolean equals( Object o )
+    {
+        if ( this == o )
+        {
+            return true;
+        }
+        if ( o == null || getClass() != o.getClass() )
+        {
+            return false;
+        }
+
+        DefaultReportEntry that = (DefaultReportEntry) o;
+
+        if ( elapsed != null ? !elapsed.equals( that.elapsed ) : that.elapsed != null )
+        {
+            return false;
+        }
+        if ( group != null ? !group.equals( that.group ) : that.group != null )
+        {
+            return false;
+        }
+        if ( message != null ? !message.equals( that.message ) : that.message != null )
+        {
+            return false;
+        }
+        if ( name != null ? !name.equals( that.name ) : that.name != null )
+        {
+            return false;
+        }
+        if ( source != null ? !source.equals( that.source ) : that.source != null )
+        {
+            return false;
+        }
+        if ( stackTraceWriter != null
+            ? !stackTraceWriter.equals( that.stackTraceWriter )
+            : that.stackTraceWriter != null )
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    public int hashCode()
+    {
+        int result = source != null ? source.hashCode() : 0;
+        result = 31 * result + ( name != null ? name.hashCode() : 0 );
+        result = 31 * result + ( group != null ? group.hashCode() : 0 );
+        result = 31 * result + ( message != null ? message.hashCode() : 0 );
+        result = 31 * result + ( stackTraceWriter != null ? stackTraceWriter.hashCode() : 0 );
+        result = 31 * result + ( elapsed != null ? elapsed.hashCode() : 0 );
+        return result;
     }
+
+
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DetailedConsoleReporter.java Mon Dec 20 21:09:04 2010
@@ -32,10 +32,4 @@ public class DetailedConsoleReporter
     {
         super( PLAIN, reporterConfiguration );
     }
-
-    /** @deprecated Can be removed once we build Surefire with 2.7 */
-    public DetailedConsoleReporter( Boolean trimStackTrace )
-    {
-        super( PLAIN, trimStackTrace );
-    }
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/FileReporter.java Mon Dec 20 21:09:04 2010
@@ -19,8 +19,6 @@ package org.apache.maven.surefire.report
  * under the License.
  */
 
-import java.io.File;
-
 /**
  * Text file reporter.
  *
@@ -34,10 +32,4 @@ public class FileReporter
     {
         super( reporterConfiguration, PLAIN );
     }
-
-    /** @deprecated Can be removed once we build Surefire with 2.7 */
-    public FileReporter( File reportsDirectory, Boolean trimStackTrace )
-    {
-        super( reportsDirectory, PLAIN, trimStackTrace );
-    }
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ForkingConsoleReporter.java Mon Dec 20 21:09:04 2010
@@ -48,12 +48,6 @@ public class ForkingConsoleReporter
         super( reporterConfiguration );
     }
 
-    /** @deprecated Can be removed once we build Surefire with 2.7 */
-    public ForkingConsoleReporter( Boolean trimStackTrace )
-    {
-        super( trimStackTrace );
-    }
-
     /**
      * Write a header line prepending {@link #FORKING_PREFIX_HEADING}
      */

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java Mon Dec 20 21:09:04 2010
@@ -19,162 +19,17 @@ package org.apache.maven.surefire.report
  * under the License.
  */
 
-// todo: Make this an interface when surefire 2.7.1 compiles with surefire 2.7.0
-public class ReportEntry
+public interface ReportEntry
 {
-    private final String source;
+    public String getSourceName();
 
-    private final String name;
+    public String getName();
 
-    private final String group;
+    public String getGroup();
 
-    private final String message;
+    public String getMessage();
 
-    private final StackTraceWriter stackTraceWriter;
-
-    private final Integer elapsed;
-
-    protected ReportEntry( String name, String group )
-    {
-        this.name = name;
-        this.group = group;
-        this.stackTraceWriter = null;
-        this.elapsed = null;
-        this.message = null;
-        this.source = null;
-    }
-
-    public ReportEntry( String source, String name, String message )
-    {
-        this( source, name, null, message, null, null );
-    }
-
-    public ReportEntry( String source, String name, String message, StackTraceWriter stackTraceWriter )
-    {
-        this( source, name, null, message, stackTraceWriter, null );
-    }
-
-    public ReportEntry( String source, String name, String group, String message, StackTraceWriter stackTraceWriter )
-    {
-        this( source, name, group, message, stackTraceWriter, null );
-    }
-
-    public ReportEntry( String source, String name, String group, String message, StackTraceWriter stackTraceWriter,
-                        Integer elapsed )
-    {
-        if ( source == null )
-        {
-            throw new NullPointerException( "source is null" );
-        }
-        if ( name == null )
-        {
-            throw new NullPointerException( "name is null" );
-        }
-        if ( message == null )
-        {
-            throw new NullPointerException( "message is null" );
-        }
-
-        this.source = source;
-
-        this.name = name;
-
-        this.group = group;
-
-        this.message = message;
-
-        this.stackTraceWriter = stackTraceWriter;
-
-        this.elapsed = elapsed;
-    }
-
-    public String getSourceName()
-    {
-        return source;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public String getGroup()
-    {
-        return group;
-    }
-
-    public String getMessage()
-    {
-        return message;
-    }
-
-    public StackTraceWriter getStackTraceWriter()
-    {
-        return stackTraceWriter;
-    }
-
-    public Integer getElapsed()
-    {
-        return elapsed;
-    }
-
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-        if ( o == null || getClass() != o.getClass() )
-        {
-            return false;
-        }
-
-        ReportEntry that = (ReportEntry) o;
-
-        if ( elapsed != null ? !elapsed.equals( that.elapsed ) : that.elapsed != null )
-        {
-            return false;
-        }
-        if ( group != null ? !group.equals( that.group ) : that.group != null )
-        {
-            return false;
-        }
-        if ( message != null ? !message.equals( that.message ) : that.message != null )
-        {
-            return false;
-        }
-        if ( name != null ? !name.equals( that.name ) : that.name != null )
-        {
-            return false;
-        }
-        if ( source != null ? !source.equals( that.source ) : that.source != null )
-        {
-            return false;
-        }
-        if ( stackTraceWriter != null
-            ? !stackTraceWriter.equals( that.stackTraceWriter )
-            : that.stackTraceWriter != null )
-        {
-            return false;
-        }
-
-        return true;
-    }
-
-    public int hashCode()
-    {
-        int result = source != null ? source.hashCode() : 0;
-        result = 31 * result + ( name != null ? name.hashCode() : 0 );
-        result = 31 * result + ( group != null ? group.hashCode() : 0 );
-        result = 31 * result + ( message != null ? message.hashCode() : 0 );
-        result = 31 * result + ( stackTraceWriter != null ? stackTraceWriter.hashCode() : 0 );
-        result = 31 * result + ( elapsed != null ? elapsed.hashCode() : 0 );
-        return result;
-    }
-
-    public String toString()
-    {
-        return "ReportEntry{" + "source='" + source + '\'' + ", name='" + name + '\'' + ", group='" + group + '\''
-            + ", message='" + message + '\'' + ", stackTraceWriter=" + stackTraceWriter + ", elapsed=" + elapsed + '}';
-    }
+    public StackTraceWriter getStackTraceWriter();
+
+    public Integer getElapsed();
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java Mon Dec 20 21:09:04 2010
@@ -32,6 +32,7 @@ public interface Reporter
      * Indicates the start of a given test-set
      *
      * @param report the report entry describing the testset
+     * @throws ReporterException When reporting fails
      */
     void testSetStarting( ReportEntry report )
         throws ReporterException;
@@ -40,6 +41,7 @@ public interface Reporter
      * Indicates end of a given test-set
      *
      * @param report the report entry describing the testset
+     * @throws ReporterException When reporting fails
      */
     void testSetCompleted( ReportEntry report )
         throws ReporterException;

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java Mon Dec 20 21:09:04 2010
@@ -43,22 +43,19 @@ public class ReporterManager
 
     private final MulticastingReporter multicastingReporter;
 
-    private final RunReporter runReporter;
-
     private final SystemStreamCapturer consoleCapturer;
 
     public ReporterManager( List reports, RunStatistics runStatisticsForThis,
                             SystemStreamCapturer systemStreamCapturer )
     {
         this.consoleCapturer = systemStreamCapturer;
-        runReporter = multicastingReporter = new MulticastingReporter( reports );
+        multicastingReporter = new MulticastingReporter( reports );
         this.runStatisticsForThis = runStatisticsForThis;
     }
 
     protected ReporterManager( ReporterManager other )
     {
         this.multicastingReporter = other.multicastingReporter;
-        this.runReporter = other.multicastingReporter;
         this.runStatisticsForThis = other.runStatisticsForThis;
         this.consoleCapturer = other.consoleCapturer;
     }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java Mon Dec 20 21:09:04 2010
@@ -61,12 +61,6 @@ public class ReporterManagerFactory
 
     private final SystemStreamCapturer systemStreamCapturer = new SystemStreamCapturer();
 
-    public ReporterManagerFactory( List reportDefinitions, ClassLoader surefireClassLoader )
-    {
-        this( reportDefinitions, surefireClassLoader, null );
-
-    }
-
     public ReporterManagerFactory( List reportDefinitions, ClassLoader surefireClassLoader,
                                    ReporterConfiguration reporterConfiguration )
     {
@@ -104,8 +98,8 @@ public class ReporterManagerFactory
     {
         // Note, if we ever start making >1 reporter Managers, we have to aggregate run statistics
         // i.e. we cannot use a single "globalRunStatistics"
-        final ReporterManager reporterManager = new ReporterManager( reports, globalRunStatistics,
-                                                                     systemStreamCapturer );
+        final ReporterManager reporterManager =
+            new ReporterManager( reports, globalRunStatistics, systemStreamCapturer );
         if ( first == null )
         {
             synchronized ( lock )
@@ -140,33 +134,7 @@ public class ReporterManagerFactory
         {
             return new ArrayList();
         }
-        if ( reportDefinitions.iterator().next() instanceof String )
-        {
-            return instantiateReportsNewStyle( reportDefinitions, reporterConfiguration, classLoader );
-        }
-        else
-        {
-            return instantiateReportsOldStyle( reportDefinitions, classLoader );
-        }
-    }
-
-    private List instantiateReportsOldStyle( List reportDefinitions, ClassLoader classLoader )
-    {
-        List reports = new ArrayList();
-
-        for ( Iterator i = reportDefinitions.iterator(); i.hasNext(); )
-        {
-            Object[] definition = (Object[]) i.next();
-
-            String className = (String) definition[0];
-            Object[] params = (Object[]) definition[1];
-
-            Reporter report = instantiateReport( className, params, classLoader );
-
-            reports.add( report );
-        }
-
-        return reports;
+        return instantiateReportsNewStyle( reportDefinitions, reporterConfiguration, classLoader );
     }
 
     protected List instantiateReportsNewStyle( List reportDefinitions, ReporterConfiguration reporterConfiguration,
@@ -190,42 +158,31 @@ public class ReporterManagerFactory
     private static Reporter instantiateReportNewStyle( String className, ReporterConfiguration params,
                                                        ClassLoader classLoader )
     {
-        try
-        {
-            Class clazz = ReflectionUtils.loadClass( classLoader, className );
+        Class clazz = ReflectionUtils.loadClass( classLoader, className );
 
-            if ( params != null )
+        if ( params != null )
+        {
+            Class[] paramTypes = new Class[1];
+            paramTypes[0] = ReflectionUtils.loadClass( classLoader, ReporterConfiguration.class.getName() );
+            Constructor constructor = ReflectionUtils.getConstructor( clazz, paramTypes );
+            return (Reporter) ReflectionUtils.newInstance( constructor, new Object[]{ params } );
+        }
+        else
+        {
+            try
             {
-                Class[] paramTypes = new Class[1];
-                paramTypes[0] = ReflectionUtils.loadClass( classLoader,  ReporterConfiguration.class.getName() );
-
-                Constructor constructor = clazz.getConstructor( paramTypes );
-
-                return (Reporter) ReflectionUtils.newInstance( constructor, new Object[]{ params } );
+                return (Reporter) clazz.newInstance();
             }
-            else
+            catch ( IllegalAccessException e )
             {
-                return (Reporter) clazz.newInstance();
+                throw new SurefireReflectionException( e );
+            }
+            catch ( InstantiationException e )
+            {
+                throw new SurefireReflectionException( e );
             }
         }
-        catch ( IllegalAccessException e )
-        {
-            throw new SurefireReflectionException( e );
-        }
-        catch ( InstantiationException e )
-        {
-            throw new SurefireReflectionException( e );
-        }
-        catch ( NoSuchMethodException e )
-        {
-            throw new SurefireReflectionException( e );
-        }
-    }
 
-
-    private static Reporter instantiateReport( String className, Object[] params, ClassLoader classLoader )
-    {
-        return (Reporter) ReflectionUtils.instantiateObject( className, params, classLoader );
     }
 
     private void warnIfNoTests()

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetStatistics.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetStatistics.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetStatistics.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/TestSetStatistics.java Mon Dec 20 21:09:04 2010
@@ -69,11 +69,6 @@ public class TestSetStatistics
         skipped += 1;
     }
 
-    public synchronized boolean isProblemFree()
-    {
-        return !hadFailures() && !hadErrors();
-    }
-
     public synchronized boolean hadFailures()
     {
         return failures > 0;
@@ -102,14 +97,6 @@ public class TestSetStatistics
         completedCount = Integer.valueOf( results.getProperty( RESULTS_COMPLETED_COUNT, "0" ) ).intValue();
     }
 
-    public synchronized void updateResultsProperties( Properties results )
-    {
-        results.setProperty( RESULTS_ERRORS, String.valueOf( errors ) );
-        results.setProperty( RESULTS_COMPLETED_COUNT, String.valueOf( completedCount ) );
-        results.setProperty( RESULTS_FAILURES, String.valueOf( failures ) );
-        results.setProperty( RESULTS_SKIPPED, String.valueOf( skipped ) );
-    }
-
 
     public synchronized RunResult getRunResult()
     {

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java Mon Dec 20 21:09:04 2010
@@ -46,11 +46,6 @@ public class RunResult
         this.skipped = skipped;
     }
 
-    public static RunResult totalCountOnly( int totalCount )
-    {
-        return new RunResult( totalCount, 0, 0, 0 );
-    }
-
     public int getCompletedCount()
     {
         return completedCount;

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedCheckedException.java Mon Dec 20 21:09:04 2010
@@ -109,17 +109,6 @@ public class NestedCheckedException
     }
 
     /**
-     * Construct a <code>NestedCheckedException</code> with the specified nested exception.
-     *
-     * @param ex the nested exception
-     */
-    public NestedCheckedException( Throwable ex )
-    {
-        super();
-        this.cause = ex;
-    }
-
-    /**
      * Return the nested cause, or <code>null</code> if none.
      */
     public Throwable getCause()
@@ -192,6 +181,7 @@ public class NestedCheckedException
      * the JDK 1.4 exception cause mechanism once Spring requires JDK 1.4.
      *
      * @param exClass the exception class to look for
+     * @return true if it is contained
      */
     public boolean contains( Class exClass )
     {
@@ -210,7 +200,7 @@ public class NestedCheckedException
             {
                 // Cast is necessary on JDK 1.3, where Throwable does not
                 // provide a "getCause" method itself.
-                ex = ( (NestedCheckedException) ex ).getCause();
+                ex = ex.getCause();
             }
             else
             {

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/NestedRuntimeException.java Mon Dec 20 21:09:04 2010
@@ -78,24 +78,6 @@ public class NestedRuntimeException
     private Throwable cause;
 
     /**
-     * Construct a <code>NestedRuntimeException</code> with no message or exception
-     */
-    public NestedRuntimeException()
-    {
-        super();
-    }
-
-    /**
-     * Construct a <code>NestedRuntimeException</code> with the specified detail message.
-     *
-     * @param msg the detail message
-     */
-    public NestedRuntimeException( String msg )
-    {
-        super( msg );
-    }
-
-    /**
      * Construct a <code>NestedRuntimeException</code> with the specified detail message
      * and nested exception.
      *
@@ -216,6 +198,7 @@ public class NestedRuntimeException
      * the JDK 1.4 exception cause mechanism once Spring requires JDK 1.4.
      *
      * @param exClass the exception class to look for
+     * @return true if the class is contained
      */
     public boolean contains( Class exClass )
     {

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/SurefireReflectionException.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/SurefireReflectionException.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/SurefireReflectionException.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/SurefireReflectionException.java Mon Dec 20 21:09:04 2010
@@ -33,6 +33,7 @@ public class SurefireReflectionException
      * Create a <code>SurefireReflectionException</code> with the specified cause.  The
      * <code>getMessage</code> method of this exception object will return
      * <code>(cause == null ? "" : cause.toString())</code>.
+     * @param cause The cause of this exception
      */
     public SurefireReflectionException( Throwable cause )
     {

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java Mon Dec 20 21:09:04 2010
@@ -59,19 +59,6 @@ public class TestsToRun
         }
     }
 
-    public static TestsToRun fromClassName( String className, ClassLoader classLoader )
-        throws TestSetFailedException
-    {
-        try
-        {
-            return new TestsToRun( Arrays.asList( new Class[]{ classLoader.loadClass( className ) } ) );
-        }
-        catch ( ClassNotFoundException e )
-        {
-            throw new TestSetFailedException( e );
-        }
-    }
-
     public static TestsToRun fromClass( Class clazz )
         throws TestSetFailedException
     {

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/UrlUtils.java Mon Dec 20 21:09:04 2010
@@ -63,6 +63,7 @@ public class UrlUtils
         throws MalformedURLException
     {
         // with JDK 1.4+, code would be: return new URL( file.toURI().toASCIIString() );
+        //noinspection deprecation
         URL url = file.toURL();
         // encode any characters that do not comply with RFC 2396
         // this is primarily to handle Windows where the user's home directory contains spaces

Modified: maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java (original)
+++ maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/BooterDeserializer.java Mon Dec 20 21:09:04 2010
@@ -25,11 +25,10 @@ import org.apache.maven.surefire.testset
 import org.apache.maven.surefire.testset.TestRequest;
 import org.apache.maven.surefire.util.internal.StringUtils;
 
-import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.*;
+import java.util.List;
 
 /**
  * Knows how to serialize and deserialize the booter configuration.
@@ -67,8 +66,7 @@ public class BooterDeserializer
         final String testArtifactClassifier = properties.getProperty( TESTARTIFACT_CLASSIFIER );
         final Object testForFork = properties.getTypeDecoded( FORKTESTSET );
         final String requestedTest = properties.getProperty( REQUESTEDTEST );
-        final File sourceDirectory =
-            (File) getParamValue( properties.getProperty( SOURCE_DIRECTORY ), File.class.getName() );
+        final File sourceDirectory = properties.getFileProperty( SOURCE_DIRECTORY );
 
         final List reports = properties.getStringList( REPORT_PROPERTY_PREFIX );
         final List excludesList = properties.getStringList( EXCLUDES_PROPERTY_PREFIX );
@@ -122,100 +120,4 @@ public class BooterDeserializer
         return aBoolean ? Boolean.TRUE : Boolean.FALSE;
     }
 
-    private static List processStringList( String stringList )
-    {
-        String sl = stringList;
-
-        if ( sl.startsWith( "[" ) && sl.endsWith( "]" ) )
-        {
-            sl = sl.substring( 1, sl.length() - 1 );
-        }
-
-        List list = new ArrayList();
-
-        String[] stringArray = StringUtils.split( sl, "," );
-
-        for ( int i = 0; i < stringArray.length; i++ )
-        {
-            list.add( stringArray[i].trim() );
-        }
-        return list;
-    }
-
-    private static Object[] constructParamObjects( String paramProperty, Class typeProperty )
-    {
-        Object[] paramObjects = null;
-        if ( paramProperty != null )
-        {
-            // bit of a glitch that it need sto be done twice to do an odd number of vertical bars (eg |||, |||||).
-            String[] params = StringUtils.split(
-                StringUtils.replace( StringUtils.replace( paramProperty, "||", "| |" ), "||", "| |" ), "|" );
-            paramObjects = new Object[params.length];
-
-            String typeName = typeProperty.getName();
-            for ( int i = 0; i < params.length; i++ )
-            {
-                String param = params[i];
-                paramObjects[i] = getParamValue( param, typeName );
-            }
-        }
-        return paramObjects;
-    }
-
-    private static Object getParamValue( String param, String typeName )
-    {
-        if ( typeName.trim().length() == 0 )
-        {
-            return null;
-        }
-        else if ( typeName.equals( String.class.getName() ) )
-        {
-            return param;
-        }
-        else if ( typeName.equals( File.class.getName() ) )
-        {
-            return new File( param );
-        }
-        else if ( typeName.equals( File[].class.getName() ) )
-        {
-            List stringList = processStringList( param );
-            File[] fileList = new File[stringList.size()];
-            for ( int j = 0; j < stringList.size(); j++ )
-            {
-                fileList[j] = new File( (String) stringList.get( j ) );
-            }
-            return fileList;
-        }
-        else if ( typeName.equals( ArrayList.class.getName() ) )
-        {
-            return processStringList( param );
-        }
-        else if ( typeName.equals( Boolean.class.getName() ) )
-        {
-            return Boolean.valueOf( param );
-        }
-        else if ( typeName.equals( Integer.class.getName() ) )
-        {
-            return Integer.valueOf( param );
-        }
-        else if ( typeName.equals( Properties.class.getName() ) )
-        {
-            final Properties result = new Properties();
-            try
-            {
-                ByteArrayInputStream bais = new ByteArrayInputStream( param.getBytes( "8859_1" ) );
-                result.load( bais );
-            }
-            catch ( Exception e )
-            {
-                throw new RuntimeException( "bug in property conversion", e );
-            }
-            return result;
-        }
-        else
-        {
-            // TODO: could attempt to construct with a String constructor if needed
-            throw new IllegalArgumentException( "Unknown parameter type: " + typeName );
-        }
-    }
 }

Modified: maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java (original)
+++ maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooterForkException.java Mon Dec 20 21:09:04 2010
@@ -29,15 +29,6 @@ import org.apache.maven.surefire.util.Ne
 public class SurefireBooterForkException
     extends NestedCheckedException
 {
-    public SurefireBooterForkException( String message )
-    {
-        super( message );
-    }
-
-    public SurefireBooterForkException( Throwable cause )
-    {
-        super( cause );
-    }
 
     public SurefireBooterForkException( String message, Throwable cause )
     {

Modified: maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SurefireReflectorTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SurefireReflectorTest.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SurefireReflectorTest.java (original)
+++ maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SurefireReflectorTest.java Mon Dec 20 21:09:04 2010
@@ -59,7 +59,6 @@ public class SurefireReflectorTest
 
         TestRequest testSuiteDefinition =
             new TestRequest( Arrays.asList( new File[]{new File("file1"),new File("file2")} ), new File( "TestSOurce" ), "aUserRequestedTest" );
-        assertTrue( surefireReflector.isTestSuiteDefinitionAware( foo ) );
         surefireReflector.setTestSuiteDefinition( foo, testSuiteDefinition );
         assertTrue( isCalled( foo ).booleanValue() );
     }
@@ -70,7 +69,6 @@ public class SurefireReflectorTest
         SurefireReflector surefireReflector = getReflector();
         Object foo = getFoo();
 
-        assertTrue( surefireReflector.isProviderPropertiesAware( foo ) );
         surefireReflector.setProviderProperties( foo, new Properties() );
         assertTrue( isCalled( foo ).booleanValue() );
     }
@@ -82,7 +80,6 @@ public class SurefireReflectorTest
         Object foo = getFoo();
 
         ReporterConfiguration reporterConfiguration = getReporterConfiguration();
-        assertTrue( surefireReflector.isReporterConfigurationAwareAware( foo ) );
         surefireReflector.setReporterConfigurationAware( foo, reporterConfiguration );
         assertTrue( isCalled( foo ).booleanValue() );
     }
@@ -98,7 +95,6 @@ public class SurefireReflectorTest
         SurefireReflector surefireReflector = getReflector();
         Object foo = getFoo();
 
-        assertTrue( surefireReflector.isTestClassLoaderAware( foo ) );
         surefireReflector.setTestClassLoader( foo, getClass().getClassLoader(), getClass().getClassLoader() );
         assertTrue( isCalled( foo ).booleanValue() );
     }
@@ -110,7 +106,6 @@ public class SurefireReflectorTest
         Object foo = getFoo();
 
         TestArtifactInfo testArtifactInfo = new TestArtifactInfo( "12.3", "test" );
-        assertTrue( surefireReflector.isTestArtifactInfoAware( foo ) );
         surefireReflector.setTestArtifactInfo( foo, testArtifactInfo );
         assertTrue( isCalled( foo ).booleanValue() );
     }

Modified: maven/surefire/trunk/surefire-integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/pom.xml?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/pom.xml Mon Dec 20 21:09:04 2010
@@ -173,7 +173,7 @@
       </plugin>
       <plugin>
         <artifactId>maven-failsafe-plugin</artifactId>
-        <version>2.5</version>
+        <version>2.7</version>
         <configuration>
           <!-- Pass current surefire version to the main suite so that it -->
           <!-- can forward to all integration test projects. SUREFIRE-513 -->

Modified: maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java Mon Dec 20 21:09:04 2010
@@ -28,8 +28,6 @@ import org.apache.maven.surefire.report.
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManager;
 import org.apache.maven.surefire.suite.RunResult;
-import org.apache.maven.surefire.testset.PojoTestSet;
-import org.apache.maven.surefire.testset.SurefireTestSet;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.apache.maven.surefire.util.DirectoryScanner;
 import org.apache.maven.surefire.util.TestsToRun;

Modified: maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java?rev=1051292&r1=1051291&r2=1051292&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java Mon Dec 20 21:09:04 2010
@@ -20,7 +20,6 @@ package org.apache.maven.surefire.junit;
  */
 
 import org.apache.maven.surefire.report.ReporterManager;
-import org.apache.maven.surefire.testset.AbstractTestSet;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 
 import java.lang.reflect.Constructor;
@@ -30,7 +29,7 @@ import java.lang.reflect.Modifier;
 import java.lang.reflect.Proxy;
 
 public final class JUnitTestSet
-    extends AbstractTestSet
+    implements SurefireTestSet
 {
     public static final String TEST_CASE = "junit.framework.Test";
 
@@ -44,12 +43,6 @@ public final class JUnitTestSet
 
     public static final String RUN_METHOD = "run";
 
-    public static final String COUNT_TEST_CASES_METHOD = "countTestCases";
-
-    public static final String SETUP_METHOD = "setUp";
-
-    public static final String TEARDOWN_METHOD = "tearDown";
-
     private static final String TEST_SUITE = "junit.framework.TestSuite";
 
     private Class[] interfacesImplementedByDynamicProxy;
@@ -58,18 +51,23 @@ public final class JUnitTestSet
 
     private Method addListenerMethod;
 
-    private Method countTestCasesMethod;
-
     private Method runMethod;
 
     private static final Class[] EMPTY_CLASS_ARRAY = new Class[0];
 
     private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
 
+    private Class testClass;
+
     public JUnitTestSet( Class testClass )
         throws TestSetFailedException
     {
-        super( testClass );
+        if ( testClass == null )
+        {
+            throw new NullPointerException( "testClass is null" );
+        }
+
+        this.testClass = testClass;
 
         processTestClass();
     }
@@ -111,15 +109,11 @@ public final class JUnitTestSet
 
             if ( testInterface.isAssignableFrom( testClass ) )//testObject.getClass() ) )
             {
-                countTestCasesMethod = testInterface.getMethod( COUNT_TEST_CASES_METHOD, EMPTY_CLASS_ARRAY );
-
                 runMethod = testInterface.getMethod( RUN_METHOD, new Class[]{testResultClass} );
 
             }
             else
             {
-                countTestCasesMethod = testClass.getMethod( COUNT_TEST_CASES_METHOD, EMPTY_CLASS_ARRAY );
-
                 runMethod = testClass.getMethod( RUN_METHOD, new Class[]{testResultClass} );
             }
         }
@@ -252,4 +246,14 @@ public final class JUnitTestSet
         }
         return constructor;
     }
+
+    public String getName()
+    {
+        return testClass.getName();
+    }
+
+    public Class getTestClass()
+    {
+        return testClass;
+    }
 }



Mime
View raw message