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 29, 2022
1 parent b4f0859 commit 6fe8d8d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ public DisabledAlgorithmConstraints(String propertyName,
@Override
public final boolean permits(Set<CryptoPrimitive> primitives,
String algorithm, AlgorithmParameters parameters) {
if (algorithm == null || algorithm.isEmpty()) {
throw new IllegalArgumentException("No algorithm name specified");
}
if (!cachedCheckAlgorithm(algorithm)) {
return false;
}
Expand Down

1 comment on commit 6fe8d8d

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