You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "vikas kumar prabhakar (JIRA)" <ji...@apache.org> on 2019/04/04 08:08:00 UTC
[jira] [Created] (NETBEANS-2349) Convert to switch expression
vikas kumar prabhakar created NETBEANS-2349:
-----------------------------------------------
Summary: Convert 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
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