mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 04:42:06 +01:00
toRecipients(): Throw IllegalArgumentException instead of IllegalStateException
This commit is contained in:
parent
4f0493bce7
commit
83362816d0
1 changed files with 4 additions and 4 deletions
|
@ -98,7 +98,7 @@ public class EncryptionBuilder implements EncryptionBuilderInterface {
|
|||
}
|
||||
|
||||
if (encryptionKeys.isEmpty()) {
|
||||
throw new IllegalStateException("No valid encryption keys found!");
|
||||
throw new IllegalArgumentException("No valid encryption keys found!");
|
||||
}
|
||||
EncryptionBuilder.this.encryptionKeys.addAll(encryptionKeys);
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public class EncryptionBuilder implements EncryptionBuilderInterface {
|
|||
}
|
||||
}
|
||||
if (encryptionKeys.isEmpty()) {
|
||||
throw new IllegalStateException("No valid encryption keys found!");
|
||||
throw new IllegalArgumentException("No valid encryption keys found!");
|
||||
}
|
||||
EncryptionBuilder.this.encryptionKeys.addAll(encryptionKeys);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ public class EncryptionBuilder implements EncryptionBuilderInterface {
|
|||
}
|
||||
|
||||
if (encryptionKeys.isEmpty()) {
|
||||
throw new IllegalStateException("No valid encryption keys found!");
|
||||
throw new IllegalArgumentException("No valid encryption keys found!");
|
||||
}
|
||||
|
||||
EncryptionBuilder.this.encryptionKeys.addAll(encryptionKeys);
|
||||
|
@ -169,7 +169,7 @@ public class EncryptionBuilder implements EncryptionBuilderInterface {
|
|||
}
|
||||
|
||||
if (EncryptionBuilder.this.encryptionKeys.isEmpty()) {
|
||||
throw new IllegalStateException("No valid encryption keys found!");
|
||||
throw new IllegalArgumentException("No valid encryption keys found!");
|
||||
}
|
||||
|
||||
return new WithAlgorithmsImpl();
|
||||
|
|
Loading…
Reference in a new issue