mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-29 07:03:37 +07:00
22 lines
393 B
Java
22 lines
393 B
Java
// "Extract common part with variables from 'if'" "true"
|
|
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
|
|
public class IfStatementWithIdenticalBranches {
|
|
int getX(int x) {
|
|
return x;
|
|
}
|
|
|
|
int work() {
|
|
final int y;
|
|
if(true) {
|
|
y = getX(12);
|
|
} else {
|
|
y = getX(33);
|
|
System.out.println(y);
|
|
}
|
|
return y;
|
|
}
|
|
} |