[ 
https://issues.apache.org/jira/browse/NETBEANS-4073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17130103#comment-17130103
 ] 

Geertjan Wielenga commented on NETBEANS-4073:
---------------------------------------------

Definitely, yes, the editor is hitched to the javac of the JVM used to run 
NetBeans. 

> JDK14 features still declared as preview (e.g. switch) - Project contains 
> "file with errors"
> --------------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-4073
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4073
>             Project: NetBeans
>          Issue Type: Bug
>          Components: ide - Code, platform - JDK Problems
>    Affects Versions: 11.3
>         Environment: Manjaro Linux, JDK14, NB11.3
>            Reporter: Klaus Ahrenberg
>            Priority: Trivial
>              Labels: 11.3, 12.0, jdk14, preview-features
>         Attachments: switch_expression.png
>
>
> With configuration NB11.2 and JDK13 I used the flag --enable-preview to use 
> the new switch command for example. In JDK14  the new switch command is not 
> longer a preview feature, it's implemented in the JDK now.
> However, in NB11.3 and JDK14 I cannot use the --enable-preview flag. 
> Running/compiling with this flag results in error. If I remove the flag, 
> application is compiling and running in JDK14.
> The Netbeans IDE itself shows in the project still "files with errors" and at 
> every program run it displays the message "project still has failures. 
> Continue?". If I look at the marked files with error, it shows me the files 
> where the new switch command is used. The hint is "Use --enable-preview flag" 
> which can not be used anymore.
> To reproduce:
>  - Create Java App - Source level and JDK version 14
>  - Use new switch statement in code
>  
> {{switch (b) {}}
>  {{   case 1 -> System.out.println("1");}}
>  {{   default -> System.out.println("other");}}
>  {{}}}



--
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

Reply via email to