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,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 "";}
|
||||
}
|
||||
Reference in New Issue
Block a user