[ https://issues.apache.org/jira/browse/NETBEANS-5470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17304514#comment-17304514 ]
Austin Stephens commented on NETBEANS-5470: ------------------------------------------- Any idea when that might happen? > Pattern matching marked as error in Java 16 project > --------------------------------------------------- > > Key: NETBEANS-5470 > URL: https://issues.apache.org/jira/browse/NETBEANS-5470 > Project: NetBeans > Issue Type: Bug > Components: java - Hints > Affects Versions: 12.3 > Reporter: Austin Stephens > Priority: Major > > When one has a Java project using JDK 16 and has the source level set to 16, > Netbeans still shows the use of pattern matching as an error even though it > is no longer a preview feature. The code is question still compiles > successfully. > > {code:java} > public class Test{ > private boolean test(Object obj){ > if (obj instanceof String s){ > return s.isBlank(); > } > return false; > } > } > {code} > 15 and 16 aren't listed in the source level drop-down for Netbeans Module > projects, so you have to specify 15 or 16 directly in the properties file. > That may be related, but I am not sure. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists