Java: Add braces when extracting method from then/else branch or loop body (IDEA-181096)

This commit is contained in:
Pavel Dolgov
2017-11-14 12:45:21 +03:00
parent a84b6cf0db
commit d14254cade
15 changed files with 315 additions and 14 deletions
@@ -0,0 +1,14 @@
class DoIfWhile {
String foo(int a, boolean b) {
int x = 0;
do <selection>/*comment*/ if (b) {
String s = bar(x);
if (s != null) return s;
}</selection>
while (++x < a);
return null;
}
String bar(int x) { return "";}
}