You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/14 13:48:42 UTC

[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #440: [SUREFIRE-1964] Support for method filtering on excludesFile and includesFile

Tibor17 commented on a change in pull request #440:
URL: https://github.com/apache/maven-surefire/pull/440#discussion_r784855788



##########
File path: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
##########
@@ -2289,16 +2321,13 @@ private void maybeAppendList( List<String> base, List<String> list )
     private void checkMethodFilterInIncludesExcludes( Iterable<String> patterns )
         throws MojoFailureException
     {
-        if ( patterns != null )
+        for ( String pattern : patterns )
         {
-            for ( String pattern : patterns )
+            if ( pattern != null && pattern.contains( "#" ) )
             {
-                if ( pattern != null && pattern.contains( "#" ) )
-                {
-                    throw new MojoFailureException( "Method filter prohibited in "
-                                                        + "includes|excludes|includesFile|excludesFile parameter: "
-                                                        + pattern );
-                }
+                throw new MojoFailureException( "Method filter prohibited in "
+                    + "includes|excludes|includesFile|excludesFile parameter: "

Review comment:
       good catch!
   The commit 6e06d2aabb7d612dce1e966c456f2060eeff3eab did not employ any ITs in 2015.




-- 
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-unsubscribe@maven.apache.org

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