Skip to content

Commit

Permalink
Use isEmpty().
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jan 17, 2021
1 parent 05e4acb commit cca4d8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -148,7 +148,7 @@ public static CryptoCipher getCryptoCipher(final String transformation, final Pr
throws GeneralSecurityException {

final List<String> names = Utils.splitClassNames(getCipherClassString(properties), ",");
if (names.size() == 0) {
if (names.isEmpty()) {
throw new IllegalArgumentException("No classname(s) provided");
}
CryptoCipher cipher = null;
Expand Down
Expand Up @@ -186,7 +186,7 @@ public static CryptoRandom getCryptoRandom() throws GeneralSecurityException {
public static CryptoRandom getCryptoRandom(final Properties props)
throws GeneralSecurityException {
final List<String> names = Utils.splitClassNames(getRandomClassString(props), ",");
if (names.size() == 0) {
if (names.isEmpty()) {
throw new IllegalArgumentException("No class name(s) provided");
}
final StringBuilder errorMessage = new StringBuilder();
Expand Down

0 comments on commit cca4d8d

Please sign in to comment.