mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
22 lines
386 B
Java
22 lines
386 B
Java
// "Extract common part removing branch" "true"
|
|
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
|
|
public class IfStatementWithIdenticalBranches {
|
|
int getX() {
|
|
return 42;
|
|
}
|
|
|
|
int work() {
|
|
if<caret>(true) {
|
|
final int y = getX();
|
|
return y;
|
|
} else {
|
|
final int x = getX();
|
|
System.out.println(x);
|
|
return x;
|
|
}
|
|
}
|
|
} |