chadwick00 commented on code in PR #218:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/218#discussion_r1342636364


##########
src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java:
##########
@@ -638,4 +720,35 @@ private List<Artifact> filterDependencies( Set<Artifact> 
artifacts, String[] exc
 
         return result;
     }
+
+
+    /**
+     * Filter for artifacts that match the <code>include</code> criteria.
+     * No filtering is applied if the criteria is empty.
+     *
+     * @param artifacts filtered for elements that do match the criteria
+     * @param includes the filter to be applied
+     * @return the list of artifacts that didn't match the criteria
+     */
+    private List<Artifact> filterDependencies( Set<Artifact> artifacts, 
String[] includes )
+    {
+        List<Artifact> result = new ArrayList<>();
+
+        if ( includes.length > 0 )

Review Comment:
   Not a collection. Happy to call Arrays.asList (includes) earlier if you 
prefer.



##########
src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java:
##########
@@ -638,4 +720,35 @@ private List<Artifact> filterDependencies( Set<Artifact> 
artifacts, String[] exc
 
         return result;
     }
+
+
+    /**
+     * Filter for artifacts that match the <code>include</code> criteria.
+     * No filtering is applied if the criteria is empty.
+     *
+     * @param artifacts filtered for elements that do match the criteria
+     * @param includes the filter to be applied
+     * @return the list of artifacts that didn't match the criteria
+     */
+    private List<Artifact> filterDependencies( Set<Artifact> artifacts, 
String[] includes )
+    {
+        List<Artifact> result = new ArrayList<>();
+
+        if ( includes.length > 0 )

Review Comment:
   Not a Collection. Happy to call Arrays.asList (includes) earlier if you 
prefer.



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