mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-86945 'Redundant type cast' and 'Constant conditions & exceptions' inspections
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class Foo {
|
||||
public void foo() {
|
||||
Integer a = 128;
|
||||
Integer b = (int) a;// cast is necessary because new object is created
|
||||
Integer c = 128;
|
||||
|
||||
System.out.println(a == b);
|
||||
System.out.println(<warning descr="Condition 'a == c' is always 'false'">a == c</warning>);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user