hardcode Map.remove as having unknown nullity (IDEA-CR-28277, IDEA-183875)

This commit is contained in:
peter
2018-01-08 18:52:37 +01:00
parent 0d510a529b
commit 9cffe95fa7
3 changed files with 17 additions and 5 deletions
@@ -14,4 +14,16 @@ class Test {
System.out.println("it's not contained");
}
}
public void main2(Map<@NotNull String, @NotNull Integer> map, HashMap<@NotNull String, @NotNull Integer> hashMap) {
Integer value = map.remove("y");
if (value == null) {
System.out.println("it's not contained");
}
value = hashMap.remove("y");
if (value == null) {
System.out.println("it's not contained");
}
}
}