You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/04/10 04:50:12 UTC

[GitHub] [incubator-netbeans] vikasprabhakar opened a new pull request #1193: [NETBEANS-2349] Convert switch to switch expression

vikasprabhakar opened a new pull request #1193: [NETBEANS-2349] Convert switch to switch expression
URL: https://github.com/apache/incubator-netbeans/pull/1193
 
 
   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 is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists