mbien commented on code in PR #7024:
URL: https://github.com/apache/netbeans/pull/7024#discussion_r1536767236


##########
java/gradle.java/src/org/netbeans/modules/gradle/java/classpath/AbstractGradleClassPathImpl.java:
##########
@@ -105,10 +105,7 @@ private boolean hasChanged(List<URL> oldValue, List<URL> 
newValue) {
     @Override
     public final synchronized List<? extends PathResourceImplementation> 
getResources() {
         if (resources == null) {
-            resources = new ArrayList<>();
-            for (URL url : createPath()) {
-                resources.add(ClassPathSupport.createResource(url));
-            }
+            resources = 
createPath().stream().map(ClassPathSupport::createResource).collect(Collectors.toList());

Review Comment:
   since this module uses JDK 17 now, you could call `toList()` directly on the 
stream.



##########
extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java:
##########
@@ -1274,7 +1285,7 @@ private void detectSources(NbProjectInfoModel model) {
                     model.getInfo().put(propBase + "output_resources", 
sourceSet.getOutput().getResourcesDir());
                     sinceGradle("5.2", () -> {
                         model.getInfo().put(propBase + "GENERATED", 
storeSet(getProperty(sourceSet, "output", "generatedSourcesDirs", "files")));
-                    });
+                    });                        

Review Comment:
   nitpick: whitespace anomaly :)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to