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/02/09 02:09:28 UTC
[GitHub] vikasprabhakar opened a new pull request #1126: [NETBEANS-1675]Java Hint to fix error :different case kinds used in s…
vikasprabhakar opened a new pull request #1126: [NETBEANS-1675]Java Hint to fix error :different case kinds used in s…
URL: https://github.com/apache/incubator-netbeans/pull/1126
The changes works for different case kinds in switch expression.
Ex: Scenario 1: Switch Statements
int k = 1;
switch(k){
case 1 :
System.out.println( "one");
break;
case 2 -> System.out.println( "two");
}
After Fix:
ink k = 1;
switch (k){
case 1 -> System.out.println( "one");
case 2 -> System.out.println( "two");
}
Scenario 1: Switch Expression
int k = 1;
var result = switch(k){
case 1 :
break "one";
case 2 -> "two";
}
After Fix:
ink k = 1;
switch (k){
case 1 -> { break "one"; }
case 2 -> { break "two"; }
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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