negora commented on issue #5260: URL: https://github.com/apache/netbeans/issues/5260#issuecomment-1401933035
I can confirm this issue. I've versions 15 and 16 of NetBeans IDE installed in Debian 11.6, and the latter works incorrectly when I've the option _Compile on save_ enabled (which I always have). Version 15 behaves well. As @pedro-w mentions, in my case what triggers this error is the use of the newer form of `instanceof`, the one that uses pattern matching. All the classes that use this form are affected. I've checked this by using `javap` and decompiling them. I've found code like this: ``` #39 = Utf8 (J)I #40 = Class #41 // java/lang/RuntimeException #41 = Utf8 java/lang/RuntimeException #42 = String #43 // Uncompilable code #43 = Utf8 Uncompilable code #44 = Methodref #40.#45 // java/lang/RuntimeException."<init>":(Ljava/lang/String;)V #45 = NameAndType #5:#46 // "<init>":(Ljava/lang/String;)V ``` I've tested this with versions 17 and 19 of OpenJDK. -- 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
