ottlinger commented on code in PR #175: URL: https://github.com/apache/creadur-rat/pull/175#discussion_r1421079023
########## apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java: ########## @@ -392,7 +392,7 @@ private void setIncludes(DirectoryScanner ds) throws MojoExecutionException { } includeList.addAll(getPatternsFromFile(f, charset)); } - ds.setIncludes(includeList.toArray(new String[includeList.size()])); + ds.setIncludes(includeList.toArray(new String[0])); Review Comment: Following https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html#toArray-T:A- setting the array's size prevents creating a new one. -- 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: dev-unsubscr...@creadur.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org