diff --git a/src/java.base/share/classes/java/security/KeyStore.java b/src/java.base/share/classes/java/security/KeyStore.java index 5b9bfe8d06c..9ac02b51b82 100644 --- a/src/java.base/share/classes/java/security/KeyStore.java +++ b/src/java.base/share/classes/java/security/KeyStore.java @@ -25,7 +25,9 @@ package java.security; +import org.jspecify.annotations.NonNull; import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.NullUnmarked; import org.jspecify.annotations.Nullable; import java.io.*; @@ -814,7 +816,8 @@ public String toString() { * @param provider the provider. * @param type the keystore type. */ - protected KeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type) + @NullUnmarked // https://github.com/jspecify/jdk/pull/29#issuecomment-1653637366 + protected KeyStore(@NonNull KeyStoreSpi keyStoreSpi, Provider provider, @NonNull String type) { this.keyStoreSpi = keyStoreSpi; this.provider = provider;