apupier commented on code in PR #8271:
URL: https://github.com/apache/camel-quarkus/pull/8271#discussion_r2781309291


##########
extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/util/PathFilter.java:
##########
@@ -104,7 +103,7 @@ public String[] scanClassNames(Stream<Path> 
archiveRootDirs) {
         /* Let's add the paths without wildcards even if they did not match 
any Jandex class
          * A workaround for 
https://github.com/apache/camel-quarkus/issues/2969 */
         addNonPatternPaths(selectedPaths);
-        return selectedPaths.toArray(new String[0]);
+        return selectedPaths.toArray(String[]::new);
     }

Review Comment:
   when it is a "Pattern 2", I do not really benefits of doing the change. The 
claim is that it avoids to calculte the size of the list but in fact the size 
of the list wasn't calculated already (thuis is the kind of thing which was 
usually done in the past but for several years it was slowly replaced 
everywhere as Java improved and best practice moved to use a size 0 directly).
   
   given that the changes are already done in the PR that's fine but I think it 
is not worthy to do this kind of change later on.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to