mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 00:19:11 +07:00
Fixes IDEA-367387 Mismatch between IDEA and JSpecify on HashMap.getDefault(...) nullness GitOrigin-RevId: 6e90dcdac5b61aa91431f96d007261ad448ea522
13 lines
274 B
Java
13 lines
274 B
Java
import org.jspecify.annotations.NullMarked;
|
|
import org.jspecify.annotations.Nullable;
|
|
|
|
import java.util.HashMap;
|
|
|
|
@NullMarked
|
|
class Main {
|
|
HashMap<String, String> map = new HashMap<>();
|
|
|
|
public @Nullable String example() {
|
|
return map.getOrDefault("key", null);
|
|
}
|
|
} |