mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
[java-inspections] IDEA-277236 Java 17 support: Conversion from if to switch - misplaced end of line comments and including unrelated return statement in switch.
GitOrigin-RevId: 3bb220692bc9d731f945be76996c314c9ee353f3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f299c8ecd4
commit
74da8644f3
+12
@@ -0,0 +1,12 @@
|
||||
class Comments {
|
||||
String foo(int par) {
|
||||
<caret>return switch (par) {
|
||||
case 11 -> "ciao";/* case 1*/
|
||||
case 14 -> "fourteen";//case 2
|
||||
case 15 -> "fifteen"; //case 3
|
||||
default -> "default";
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class Comments {
|
||||
String foo(int par) {
|
||||
i<caret>f(par == 11)
|
||||
return "ciao";/* case 1*/
|
||||
else if(par == 14)
|
||||
return "fourteen";//case 2
|
||||
else if(par == 15)
|
||||
return "fifteen"; //case 3
|
||||
|
||||
|
||||
return "default";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user