mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EnhancedSwitchBackwardMigration: do not generate break if cannot may complete normally: IDEA-205607
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// "Replace with old style 'switch' statement" "true"
|
||||
import java.util.*;
|
||||
|
||||
class X {
|
||||
boolean x(int i) {
|
||||
boolean b;
|
||||
switch (i) {
|
||||
case 2:
|
||||
throw null;
|
||||
default:
|
||||
b = true;
|
||||
break;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace with old style 'switch' statement" "true"
|
||||
import java.util.*;
|
||||
|
||||
class X {
|
||||
boolean x(int i) {
|
||||
boolean b;
|
||||
switch<caret> (i) {
|
||||
case 2 -> throw null;
|
||||
default -> b = true;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user