mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-216810 Unexpected behaviour with "Transform Method to Single Exit Point" / Inline refactoring
GitOrigin-RevId: 31a77ebb86f3da40caeda5e8ca60ccec51ebfb13
This commit is contained in:
committed by
intellij-monorepo-bot
parent
50ff44aebd
commit
30b914be28
+10
@@ -0,0 +1,10 @@
|
||||
// "Transform body to single exit-point form" "true"
|
||||
class Test {
|
||||
private String nameByIndex(int colourIndex) {
|
||||
String result = "Blue";
|
||||
if (colourIndex == 1) {
|
||||
result = "Red";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Transform body to single exit-point form" "true"
|
||||
class Test {
|
||||
private String nameByIndex(int colourIndex) {
|
||||
String result = "Blue";
|
||||
if (colourIndex == 1) {
|
||||
result = "Red";
|
||||
} else if (colourIndex == 2) {
|
||||
result = "Green";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Transform body to single exit-point form" "true"
|
||||
class Test {
|
||||
private <caret>String nameByIndex(int colourIndex) {
|
||||
if (colourIndex == 1) {
|
||||
return "Red";
|
||||
}
|
||||
return "Blue";
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Transform body to single exit-point form" "true"
|
||||
class Test {
|
||||
private <caret>String nameByIndex(int colourIndex) {
|
||||
if (colourIndex == 1) {
|
||||
return "Red";
|
||||
} else if (colourIndex == 2) {
|
||||
return "Green";
|
||||
}
|
||||
return "Blue";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user