[extract method] IDEA-278872: fix missed return variable

GitOrigin-RevId: 55ffed6010a531c34dfa18e22ad5b82ced9599ba
This commit is contained in:
Alexandr Suhinin
2021-10-14 12:21:43 +03:00
committed by intellij-monorepo-bot
parent f40371f009
commit c3afc8b902
4 changed files with 33 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
class Test {
void test() {
<selection>final String str = "atata";
do {
System.out.println();
} while (Math.random() > 0.5);</selection>
System.out.println(str);
}
}

View File

@@ -0,0 +1,18 @@
import org.jetbrains.annotations.NotNull;
class Test {
void test() {
final String str = getString();
System.out.println(str);
}
@NotNull
private String getString() {
final String str = "atata";
do {
System.out.println();
} while (Math.random() > 0.5);
return str;
}
}