1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-10 18:59:39 +02:00

Annotate fromId(code) methods with Nullable and add Nonnull requireFromId(code) methods

This commit is contained in:
Paul Schaub 2022-03-22 15:09:09 +01:00
parent 16b0d0730e
commit e8b03834cb
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
24 changed files with 278 additions and 42 deletions

View file

@ -70,7 +70,7 @@ public class DecryptImpl implements Decrypt {
public DecryptImpl withSessionKey(SessionKey sessionKey) throws SOPGPException.UnsupportedOption {
consumerOptions.setSessionKey(
new org.pgpainless.util.SessionKey(
SymmetricKeyAlgorithm.fromId(sessionKey.getAlgorithm()),
SymmetricKeyAlgorithm.requireFromId(sessionKey.getAlgorithm()),
sessionKey.getKey()));
return this;
}