IDEA-42948 Idea fails to recognize "non-nullness" after unchecked cast

This commit is contained in:
peter
2012-10-29 12:57:22 +01:00
parent 30769e9b16
commit 51515e63ed
3 changed files with 21 additions and 25 deletions
@@ -0,0 +1,16 @@
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public class BrokenAlignment {
void t() {
@NotNull Collection list = new ArrayList();
List<String> strings = (List<String>) list;
if (<warning descr="Condition 'strings != null' is always 'true'">strings != null</warning>) {
int foo = 42;
}
}
}