Skip to content

Commit

Permalink
8285696: AlgorithmConstraints:permits not throwing IllegalArgumentExc…
Browse files Browse the repository at this point in the history
…eption when 'alg' is null

Backport-of: 47951655acacba515c0d69f5192257664f887dba
  • Loading branch information
GoeLin committed Jun 21, 2022
1 parent 4b25717 commit 6f4c270
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ public final boolean permits(Set<CryptoPrimitive> primitives,
throw new IllegalArgumentException("The primitives cannot be null" +
" or empty.");
}
if (algorithm == null || algorithm.isEmpty()) {
throw new IllegalArgumentException("No algorithm name specified");
}

if (!cachedCheckAlgorithm(algorithm)) {
return false;
Expand Down

1 comment on commit 6f4c270

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.