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 2020/05/20 06:02:26 UTC

[GitHub] [maven-ejb-plugin] pzygielo commented on a change in pull request #3: Refactor - extract method

pzygielo commented on a change in pull request #3:
URL: https://github.com/apache/maven-ejb-plugin/pull/3#discussion_r427759810



##########
File path: src/main/java/org/apache/maven/plugins/ejb/IncludesExcludes.java
##########
@@ -46,33 +46,27 @@ public IncludesExcludes( List<String> includes, List<String> excludes, List<Stri
 
     public String[] resultingIncludes()
     {
-        String[] result = new String[0];
-        if ( includes.isEmpty() )
-        {
-            result = defaultIncludes.toArray( new String[defaultIncludes.size()] );
-        }
-        else
-        {
-            result = includes.toArray( new String[includes.size()] );
-        }
-
-        return result;
+        return resultingXcludes( includes, defaultIncludes );
     }
 
     public String[] resultingExcludes()
+    {
+        return resultingXcludes( excludes, defaultExcludes );
+    }
+
+    private static String[] resultingXcludes( List<String> currentXcludes, List<String> defaultXcludes )

Review comment:
       > can the args have a decent names?
   
   Could you suggest something else that will cover both includes and excludes?




----------------------------------------------------------------
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.

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