You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Sandeep Mishra (Jira)" <ji...@apache.org> on 2021/11/29 05:05:00 UTC
[jira] [Created] (NETBEANS-6241) SwitchToRuleSwitch Hint not working with Pattern Matching Switch
Sandeep Mishra created NETBEANS-6241:
----------------------------------------
Summary: SwitchToRuleSwitch Hint not working with Pattern Matching Switch
Key: NETBEANS-6241
URL: https://issues.apache.org/jira/browse/NETBEANS-6241
Project: NetBeans
Issue Type: Bug
Components: java - Hints
Affects Versions: 12.5
Reporter: Sandeep Mishra
Assignee: Sandeep Mishra
With the given code :
static void testSwitchStatements(Integer i) {
switch (i) {
case 1, 2 : System.out.println("1"); break;
case 3 : System.out.println("3"); break;
case Integer i : System.out.println(i);
break;
}
}
we get the hint to covert to rule switch. The output of the hint does not convert the binding pattern to rule switch case.
static void testSwitchStatements(Integer i) {
switch (i) {
case 1, 2 -> System.out.println("1");
case 3 -> System.out.println("3");
case Integer i : System.out.println(i);
break;
}
}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
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