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);
   ```
   ?  What's the point of the check against `getNameExt` - seems to be the 
cause of the bug.



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