homberghp commented on PR #8575: URL: https://github.com/apache/netbeans/pull/8575#issuecomment-2965324195
I should have saved the error message that NetBeans produced via a bulb at the bottom status line. That exactly pointed to the `switch(tp.getLeaf().getKind())` statement on line 117, with the message that getLeaf() returns null. If null is an acceptable return value for the method, then suggestion by mbien is probably the better one. I chose to follow the pattern inside the case labels which tend to continue the loop. https://github.com/apache/netbeans/blob/049b5edb552daafb147b85c83b8dd81a1f6b5501/java/java.hints/src/org/netbeans/modules/java/hints/control/RemoveUnnecessary.java#L108-L134 -- 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-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists