mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
preserve comments: replace switch with if (IDEA-113518)
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
// "Replace 'switch' with 'if'" "true"
|
||||
class X {
|
||||
public void doSomething( String value) {
|
||||
if ("case1".equals(value)) {
|
||||
//comment1
|
||||
//comment3
|
||||
//comment4
|
||||
//comment5
|
||||
//comment6
|
||||
//comment7
|
||||
//comment8
|
||||
if ("case1".equals(value)) {//comment2
|
||||
|
||||
} else if ("case2".equals(value)) {
|
||||
} else {
|
||||
}
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
class X {
|
||||
public void doSomething( String value) {
|
||||
switch<caret> ( value ) {
|
||||
case "case1":
|
||||
break;
|
||||
case "case2":
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case "case1"://comment1
|
||||
//comment2
|
||||
break;//comment3
|
||||
case "case2"://comment4
|
||||
break;//comment5
|
||||
default://comment6
|
||||
break;//comment7
|
||||
}//comment8
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user