mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
21 lines
334 B
Java
21 lines
334 B
Java
// "Extract variables from 'if'" "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) {
|
|
int x = getX();
|
|
//Then
|
|
} else {
|
|
int x = getX();
|
|
return x;
|
|
}
|
|
}
|
|
} |