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/09/27 11:56:21 UTC

[GitHub] [netbeans] sdedic commented on a change in pull request #2399: [NETBEANS-4832] Avoid assertion & NPE in fxml code completion

sdedic commented on a change in pull request #2399:
URL: https://github.com/apache/netbeans/pull/2399#discussion_r495565280



##########
File path: java/java.source.base/src/org/netbeans/modules/java/source/ElementUtils.java
##########
@@ -60,6 +60,11 @@ public static TypeElement getTypeElementByBinaryName(JavacTask task, String name
         for (ModuleElement me : allModules) {
             TypeElement found = getTypeElementByBinaryName(task, me, name);
 
+            if (result == found) {
+                // avoid returning null, partial fix for [NETBEANS-4832]
+                continue;
+            }
+

Review comment:
       Not related to this bug, but a few lines below: `(elem.getKind() == ElementKind.CLASS || elem.getKind() == ElementKind.INTERFACE)` IMHO does not work for `ANNOTATION_TYPE` and `ENUM`. Could be worth to fix as
   `elem.getKind().isClass() || elem.getKind().isInterface` ?




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