You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Austin Stephens (Jira)" <ji...@apache.org> on 2021/03/18 22:42:00 UTC
[jira] [Created] (NETBEANS-5470) Pattern matching marked as error
in Java 16 project
Austin Stephens created NETBEANS-5470:
-----------------------------------------
Summary: 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
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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists