Skip to content

[NETBEANS-3078]:Provided Error Hint to turn on Preview Features in An…#1487

Merged
geertjanw merged 2 commits intoapache:masterfrom
arusinha-zz:netbeans-3078
Sep 14, 2019
Merged

[NETBEANS-3078]:Provided Error Hint to turn on Preview Features in An…#1487
geertjanw merged 2 commits intoapache:masterfrom
arusinha-zz:netbeans-3078

Conversation

@arusinha-zz
Copy link
Copy Markdown

…t Java projects

Jira Link: https://issues.apache.org/jira/browse/NETBEANS-3078

Suppose we had used switch-expression in Java application (JDK-12)
e.g.,
int a = switch (num)
{ case 1 ->1; default->2; }
;
It will show the below error:

switch expressions are a preview feature and are disabled by default.
(use --enable-preview to enable switch expressions)

The proposed hint will add the needed JVM parameter in run/compiler properties

@geertjanw
Copy link
Copy Markdown
Member

Great, very useful, merging,

@geertjanw geertjanw merged commit 40b6820 into apache:master Sep 14, 2019
@junichi11 junichi11 added the Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) label Sep 14, 2019
@junichi11 junichi11 added this to the 11.2 milestone Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants