IDEA-51920 'Suspicious call to Map.get' inspection should be aware of dataflow type information

This commit is contained in:
peter
2011-12-30 16:18:34 +01:00
parent 52e6e8e2d7
commit 75c5872a0a
3 changed files with 23 additions and 1 deletions
@@ -0,0 +1,11 @@
import java.lang.Integer;
import java.util.Map;
class Clazz {
void f(Map<Integer, String> map, Object o) {
if (o instanceof Integer && map.containsKey(o)) {
System.out.println();
}
}
}