IDEA-110917 Incorrect "Redundant Cast" on Complex Conditional

This commit is contained in:
anna
2013-07-24 17:14:30 +02:00
parent d59413a8a1
commit 080504137e
3 changed files with 13 additions and 0 deletions
@@ -0,0 +1,8 @@
public class Foo {
public static void main(String[] args) {
final boolean b = false;
final Integer i = (<warning descr="Casting '3' to 'Integer' is redundant">Integer</warning>)3;
final short s = (short)(b ? i : (int)Integer.valueOf(3));
System.out.println(s);
}
}