mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[java-annotations] getOrDefault 2nd parameter is marked as nullable
Fixes IDEA-367387 Mismatch between IDEA and JSpecify on HashMap.getDefault(...) nullness GitOrigin-RevId: 6e90dcdac5b61aa91431f96d007261ad448ea522
This commit is contained in:
committed by
intellij-monorepo-bot
parent
90e67979e7
commit
b007ebf865
@@ -0,0 +1,13 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user