mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
18 lines
507 B
Java
18 lines
507 B
Java
// "Extract variables from 'if'" "true"
|
|
|
|
|
|
public class Main {
|
|
// https://youtrack.jetbrains.com/issue/IDEA-229916
|
|
public void analysisBugWithMinAndMax(int width, int height, boolean someFlag) {
|
|
if<caret> (someFlag) {
|
|
int a = Math.max(width, height);
|
|
int b = Math.min(width, height);
|
|
System.out.println("a=" + a + ", b=" + b);
|
|
}
|
|
else {
|
|
int b = Math.max(width, height);
|
|
int a = Math.min(width, height);
|
|
System.out.println("a=" + a + ", b=" + b);
|
|
}
|
|
}
|
|
} |