diff --git a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java index 7c8542a3..5d08ba65 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java +++ b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionOptions.java @@ -146,7 +146,7 @@ public class EncryptionOptions { List encryptionSubkeys = encryptionKeySelectionStrategy .selectEncryptionSubkeys(info.getEncryptionSubkeys(userId, purpose)); if (encryptionSubkeys.isEmpty()) { - throw new AssertionError("Key has no suitable encryption subkeys."); + throw new IllegalArgumentException("Key has no suitable encryption subkeys."); } for (PGPPublicKey encryptionSubkey : encryptionSubkeys) {