[
https://issues.apache.org/jira/browse/NETBEANS-5470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Bien closed NETBEANS-5470.
----------------------------------
Fix Version/s: 13
Resolution: Fixed
should work fine since NB 13
> 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
> Fix For: 13
>
>
> 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.20.10#820010)
---------------------------------------------------------------------
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