mbien commented on code in PR #8607:
URL: https://github.com/apache/netbeans/pull/8607#discussion_r2160004614


##########
enterprise/web.primefaces/src/org/netbeans/modules/web/primefaces/PrimeFacesTagFeatureProvider.java:
##########
@@ -63,10 +66,16 @@ public Attribute getItems() {
     }
 
     private PrimeFacesTagFeatureProvider.IterableTag 
resolveIterableTag(Library library, Tag tag) {
-        for (PrimeFacesTagFeatureProvider.IterableTag iterableTag : 
PrimeFacesTagFeatureProvider.IterableTag.values()) {
-            if (library.getNamespace() != null
-                    && iterableTag.getNamespace() != null
-                    && 
library.getNamespace().equalsIgnoreCase(iterableTag.getNamespace())) {
+        String libraryNamespace = library.getNamespace();
+        if (libraryNamespace == null) {
+            return null;
+        }
+        LibraryInfo libraryInfo = 
DefaultLibraryInfo.forNamespace(libraryNamespace);
+        if (!LIBRARIES.contains(libraryInfo)) {
+            return null;
+        }

Review Comment:
   `libraryInfo` could be null in theory, right?
   
   one trap with the immutable collections is that `contains()` with null will 
throw an exception, since they use every opportunity to tell everyone that they 
can't contain null. I would add an extra null check to that if just to be sure.



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