sdedic commented on code in PR #4525: URL: https://github.com/apache/netbeans/pull/4525#discussion_r960634890
########## java/gradle.java/src/org/netbeans/modules/gradle/java/nodes/SourcesNodeFactory.java: ########## @@ -79,7 +97,8 @@ public List<SourceGroup> keys() { ret.addAll(Arrays.asList(srcs.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA))); ret.addAll(Arrays.asList(srcs.getSourceGroups(GradleSourcesImpl.SOURCE_TYPE_KOTLIN))); ret.addAll(Arrays.asList(srcs.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_RESOURCES))); - ret.addAll(Arrays.asList(srcs.getSourceGroups(GradleSourcesImpl.SOURCE_TYPE_GENERATED))); + generatedGroups = Arrays.asList(srcs.getSourceGroups(GradleSourcesImpl.SOURCE_TYPE_GENERATED)); Review Comment: nitpick: `generatedGroups` access is unsynchronized; here, the value should be assigned first to local, then to generatedGroups + added to ret, to be consistent (within this thread). `generatedGroups` could be possibly `volatile` -- 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: notifications-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists