You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Neil C Smith (JIRA)" <ji...@apache.org> on 2019/07/03 09:46:00 UTC
[jira] [Updated] (NETBEANS-2349) Convert switch to switch
expression
[ https://issues.apache.org/jira/browse/NETBEANS-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neil C Smith updated NETBEANS-2349:
-----------------------------------
Fix Version/s: 11.1
> Convert switch to switch expression
> -----------------------------------
>
> Key: NETBEANS-2349
> URL: https://issues.apache.org/jira/browse/NETBEANS-2349
> Project: NetBeans
> Issue Type: Improvement
> Reporter: vikas kumar prabhakar
> Assignee: vikas kumar prabhakar
> Priority: Major
> Labels: pull-request-available
> Fix For: 11.1
>
> Time Spent: 4h
> Remaining Estimate: 0h
>
> Convert old switch statement to switch expression in following case:
> Old code: (Assign same variable in every case with one statement)
> int x = 5;
> String s = "foo";
> switch (x)
> { case 1: s = "bar";break; case 2: s = "baz";break; default: s = "zuq";break; }
>
> After fix:
> int x = 5;
> String s = switch (x)
> { case 1 -> "bar"; case 2 -> "baz"; default -> "zuq"; }
> ;
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
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