ReturnReplacementContext#extractTail: leave blank line in place (IDEA-219142)

GitOrigin-RevId: 30a93c99fc47f4d277b45cabe9c72b4a41b05846
This commit is contained in:
Tagir Valeev
2019-08-05 00:03:02 +03:00
committed by intellij-monorepo-bot
parent ea11a4b5d3
commit ae33c73266
3 changed files with 32 additions and 0 deletions
@@ -0,0 +1,16 @@
// "Transform body to single exit-point form" "true"
class Test {
String test(String s) {
String result = null;
try {
Integer.parseInt(s);
} catch (NumberFormatException ex) {
result = "Cannot parse number";
}
if (result == null) {
result = "Ok";
}
return result;
}
}
@@ -0,0 +1,13 @@
// "Transform body to single exit-point form" "true"
class Test {
String <caret>test(String s) {
try {
Integer.parseInt(s);
}
catch (NumberFormatException ex) {
return "Cannot parse number";
}
return "Ok";
}
}