mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Add braces when extracting method from then/else branch or loop body (IDEA-181096)
This commit is contained in:
@@ -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 "";}
|
||||
}
|
||||
Reference in New Issue
Block a user