slawekjaranowski commented on a change in pull request #494:
URL: https://github.com/apache/maven-surefire/pull/494#discussion_r835895997



##########
File path: 
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
##########
@@ -275,11 +275,11 @@ private LauncherDiscoveryRequest 
buildLauncherDiscoveryRequestForRerunFailures(
                 .map( TagFilter::excludeTags )
                 .ifPresent( filters::add );
 
-        TestListResolver testListResolver = 
parameters.getTestRequest().getTestListResolver();
-        if ( !testListResolver.isEmpty() )
-        {
-            filters.add( new TestMethodFilter( testListResolver ) );
-        }
+        of( optionallyWildcardFilter( 
parameters.getTestRequest().getTestListResolver() ) )
+            .filter( f -> !f.isEmpty() )
+            .filter( f -> !f.isWildcard() )
+            .map( TestMethodFilter::new )
+            .ifPresent( filters::add );
 

Review comment:
       So when you agree with my next commit can you use `hasMethodPatterns()` 
instead of `optionallyWildcardFilter`
   it will be removed, and I will need fix this line also.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to