Files
Tagir Valeev 35711da1d7 [java-inspections] RedundantCompareCall: insert cast when both operands are boxed
Fixes IDEA-291826 IntelliJ Suggest simplify Integer.compare method to `==`

GitOrigin-RevId: 71882cec49e2846f0b30ae626da6d07381e516e2
2022-04-22 10:57:04 +00:00

10 lines
286 B
Java

// "Fix all 'Redundant 'compare()' method call' problems in file" "true"
class Boxing {
void test(Integer x, Integer y, int z) {
boolean same = (int) x == y;
boolean same1 = x > y;
boolean same2 = (int) x != y;
boolean same3 = x == z;
boolean same4 = z == x;
}
}