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

Reviewed-by: jpai, xuelei
  • Loading branch information
djelinski committed Apr 28, 2022
1 parent c1173c2 commit 4795165
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 4795165

@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.