eirikbakke commented on code in PR #8948:
URL: https://github.com/apache/netbeans/pull/8948#discussion_r2457485658


##########
java/spi.java.hints/src/org/netbeans/modules/java/hints/spiimpl/Utilities.java:
##########
@@ -288,32 +289,36 @@ public static List<HintDescription> 
listAllHints(Set<ClassPath> cps) {
     }
 
     public static List<HintDescription> listClassPathHints(Set<ClassPath> 
sourceCPs, Set<ClassPath> binaryCPs) {
-        List<HintDescription> result = new LinkedList<>();
-        Set<FileObject> roots = new HashSet<>();
 
+        // deduplicate before running queries
+        Set<FileObject> unique = new HashSet<>(128);

Review Comment:
   Does iteration order matter for these sets? I always tend to use 
LinkedHashSet, to avoid items being randomized.



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