mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
[java-highlighting] IDEA-315469 Quickfixes for switch labels with 'default'
- fix to reverse 'case default, null' - fix to replace 'case default' with 'default' GitOrigin-RevId: 3762a40c859bb7a13a638614b3200b0005d8e85a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
17affe2b0d
commit
3d7a18e986
@@ -0,0 +1,12 @@
|
||||
// "Replace 'case default' with 'default'" "true-preview"
|
||||
class Test {
|
||||
void f() {
|
||||
Object o = null;
|
||||
switch (o) {
|
||||
case String s:
|
||||
System.out.println("2");
|
||||
/*some text*/
|
||||
default:
|
||||
System.out.println("3") /*some text2*/;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace 'case default' with 'default'" "true-preview"
|
||||
class Test {
|
||||
void f() {
|
||||
Object o = null;
|
||||
switch (o) {
|
||||
/*some text*/
|
||||
default -> {
|
||||
System.out.println("1") /*some text2*/;
|
||||
}
|
||||
} }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace 'case default' with 'default'" "true-preview"
|
||||
class Test {
|
||||
void f() {
|
||||
Object o = null;
|
||||
switch (o) {
|
||||
case String s:
|
||||
System.out.println("2");
|
||||
case /*some text*/ def<caret>ault:
|
||||
System.out.println("3") /*some text2*/;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace 'case default' with 'default'" "true-preview"
|
||||
class Test {
|
||||
void f() {
|
||||
Object o = null;
|
||||
switch (o) {
|
||||
case /*some text*/ defau<caret>lt -> {
|
||||
System.out.println("1") /*some text2*/;
|
||||
}
|
||||
} }
|
||||
}
|
||||
Reference in New Issue
Block a user