jtulach commented on code in PR #9821:
URL: https://github.com/apache/netbeans/pull/9821#discussion_r4732536452


##########
ide/projectui/src/org/netbeans/modules/project/ui/groups/DirectoryGroup.java:
##########
@@ -112,34 +114,44 @@ public GroupEditPanel createPropertiesPanel() {
     }
 
     private void processFolderChildren(FileObject fo, Set<Project> projects, 
ProgressHandle h, Counter counter, boolean checkShare) throws 
IllegalArgumentException {
-        Enumeration<? extends FileObject> e = fo.getFolders(false);
-        while (e.hasMoreElements()) {
-            try {
-                FileObject em = e.nextElement();
-                SharabilityQuery.Sharability share = 
SharabilityQuery.Sharability.UNKNOWN;
-                if (checkShare) {
-                    share = SharabilityQuery.getSharability(fo);
+        Enumeration<? extends Project> rootProjects = 
Enumerations.queue(Enumerations.array(fo.getChildren()), (dir, toAdd) -> {
+            if (!dir.isFolder()) {
+                return null;
+            }
+            if (checkShare) {

Review Comment:
   Rather than trying various experiments, I reverted the original code and 
just [added a single 
continue](https://github.com/apache/netbeans/pull/9821/changes#r4732528792).



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