You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/11/26 21:04:10 UTC

[GitHub] [netbeans] fcorneli commented on a change in pull request #2557: [NETBEANS-5057] fix for indexing JSF composite components

fcorneli commented on a change in pull request #2557:
URL: https://github.com/apache/netbeans/pull/2557#discussion_r531223548



##########
File path: enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/index/CompositeComponentModel.java
##########
@@ -270,7 +270,7 @@ private static FileObject getResourcesDirectory(FileObject file) {
             if (folder.getName().equalsIgnoreCase("resources")) { //NOI18N
                 //check if its parent is META-INF
                 FileObject parent = folder.getParent();
-                if (parent != null && parent.getNameExt().startsWith("META-INF")) { //NOI18N
+                if (parent != null && parent.getName().startsWith("META-INF")) { //NOI18N

Review comment:
       The inclusion of the "extension" is irrelevant here I guess, as you're only looking for `META-INF` at the beginning. That's probably why the original patch, as suggested on stackoverflow, changed from `getNameExt()` to `getName()`. Additional benefit is that you also get rid of a string concat by not using `getNameExt()`.
   
   As for `FileObject` itself: do you really want to change such a "core" class? This would trigger a lot of changes all over the place, no?




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

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