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,12 @@
class ForIf {
String foo(int[] a, boolean b) {
for (int x : a) <selection>if (b) {
String s = bar(x);
if (s != null) return s;
}</selection>
return null;
}
String bar(int x) { return "";}
}