diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/BaseSignatureSubpackets.java b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/BaseSignatureSubpackets.java index c6d68c6a..7e44b748 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/BaseSignatureSubpackets.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/BaseSignatureSubpackets.java @@ -90,7 +90,7 @@ public interface BaseSignatureSubpackets { BaseSignatureSubpackets setExportable(@Nullable Exportable exportable); - BaseSignatureSubpackets setPolicyUrl(@Nullable URL policyUrl); + BaseSignatureSubpackets setPolicyUrl(@Nonnull URL policyUrl); BaseSignatureSubpackets setPolicyUrl(boolean isCritical, @Nonnull URL policyUrl); diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpackets.java b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpackets.java index 742ab831..914ff2ff 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpackets.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpackets.java @@ -489,8 +489,8 @@ public class SignatureSubpackets } @Override - public BaseSignatureSubpackets setPolicyUrl(@Nullable URL policyUrl) { - return policyUrl == null ? setPolicyUrl((PolicyURI) null) : setPolicyUrl(false, policyUrl); + public BaseSignatureSubpackets setPolicyUrl(@Nonnull URL policyUrl) { + return setPolicyUrl(false, policyUrl); } @Override