Author: krosenvold
Date: Fri Jan 21 20:53:10 2011
New Revision: 1062024

URL: http://svn.apache.org/viewvc?rev=1062024&view=rev
Log:
[SUREFIRE-687] Junit47 provider runs some classes that are not test cases

Modified:
    
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java

Modified: 
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
URL: 
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java?rev=1062024&r1=1062023&r2=1062024&view=diff
==============================================================================
--- 
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
 (original)
+++ 
maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
 Fri Jan 21 20:53:10 2011
@@ -20,6 +20,7 @@ package org.apache.maven.surefire.junitc
  */
 
 import org.apache.maven.surefire.NonAbstractClassFilter;
+import org.apache.maven.surefire.common.junit4.JUnit4TestChecker;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
 import org.apache.maven.surefire.providerapi.SurefireProvider;
 import org.apache.maven.surefire.report.Reporter;
@@ -30,6 +31,7 @@ import org.apache.maven.surefire.suite.R
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.apache.maven.surefire.util.DirectoryScanner;
 import org.apache.maven.surefire.util.ReflectionUtils;
+import org.apache.maven.surefire.util.ScannerFilter;
 import org.apache.maven.surefire.util.TestsToRun;
 
 import java.util.Iterator;
@@ -55,7 +57,7 @@ public class JUnitCoreProvider
 
     private final JUnitCoreParameters jUnitCoreParameters;
 
-    private final NonAbstractClassFilter scannerFilter;
+    private final ScannerFilter scannerFilter;
 
     private final List<RunListener> customRunListeners;
 
@@ -70,7 +72,7 @@ public class JUnitCoreProvider
         this.testClassLoader = booterParameters.getTestClassLoader();
         this.directoryScanner = booterParameters.getDirectoryScanner();
         this.jUnitCoreParameters = new JUnitCoreParameters( 
booterParameters.getProviderProperties() );
-        this.scannerFilter = new NonAbstractClassFilter();
+        this.scannerFilter = new JUnit4TestChecker(testClassLoader);
         customRunListeners =
             createCustomListeners( 
booterParameters.getProviderProperties().getProperty( "listener" ) );
 


Reply via email to