mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-240285 ConstantConditions: improve detection of pointless 'Math.min' and 'Math.max' operations
+Quick-fix GitOrigin-RevId: 9f01fac2ecd4faf7ff76101a956cc30582ad421b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
852f9f04d7
commit
7b5c5c2875
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace with 'x'" "true"
|
||||
class X {
|
||||
void test(int x, int y) {
|
||||
if (x != y) return;
|
||||
System.out.println(x);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace with 'y'" "true"
|
||||
class X {
|
||||
void test(int x, int y) {
|
||||
if (x > y) return;
|
||||
System.out.println(y);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace with 'x'" "true"
|
||||
class X {
|
||||
void test(int x, int y) {
|
||||
if (x != y) return;
|
||||
System.out.println(Math.<caret>max(x, y));
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace with 'y'" "true"
|
||||
class X {
|
||||
void test(int x, int y) {
|
||||
if (x > y) return;
|
||||
System.out.println(Math.<caret>max(x, y));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user