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