You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "neilcsmith-net (via GitHub)" <gi...@apache.org> on 2023/03/29 15:48:45 UTC

[GitHub] [netbeans] neilcsmith-net commented on a diff in pull request #5739: `SourceUtils.findMatchingChild` should never return a folder

neilcsmith-net commented on code in PR #5739:
URL: https://github.com/apache/netbeans/pull/5739#discussion_r1152154319


##########
java/java.source.base/src/org/netbeans/api/java/source/SourceUtils.java:
##########
@@ -684,6 +688,9 @@ private abstract static class Match {
         }
 
         final boolean apply(final FileObject fo) {
+            if (fo.isFolder()) {
+                return false;

Review Comment:
   OK with me, although I wonder if checking for `isJava()` first might be the right way as this partly overlaps?  Could this whole method just be ...
   
   ```java
   return isJava(fo) && match(fo.getName(), name);
   ```



-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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