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