mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
16 lines
286 B
Java
16 lines
286 B
Java
// "Extract side effects as an 'if' statement" "true-preview"
|
|
class Test {
|
|
void test(int x) {
|
|
if (x > 0) {
|
|
foo(x, 1);
|
|
foo(x, 2);
|
|
} else {
|
|
foo(x, 3);
|
|
}
|
|
}
|
|
|
|
boolean foo(int x, int y) {
|
|
System.out.println(x);
|
|
return x > y;
|
|
}
|
|
} |