mbien opened a new pull request, #7973: URL: https://github.com/apache/netbeans/pull/7973
index can be less than 0 found this issue while testing https://github.com/apache/netbeans/pull/7968 this (invalid) snippet: ```java public static void main(String[] args) { switch (args) { case 0 -> {} } } ``` will cause: ``` java.lang.IndexOutOfBoundsException: -1 at com.sun.tools.javac.util.List.get(List.java:468) at org.netbeans.modules.java.hints.jdk.ConvertToSwitchPatternInstanceOf.switchPatternMatchToSwitchNull(ConvertToSwitchPatternInstanceOf.java:281) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) ``` -- 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
