--- a/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java Thu Dec 13 16:14:07 2018 +0100
+++ b/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java Thu Dec 13 15:31:05 2018 +0100
@@ -135,7 +135,7 @@
public final boolean permits(Set<CryptoPrimitive> primitives,
String algorithm, Key key, AlgorithmParameters parameters) {
- if (algorithm == null || algorithm.length() == 0) {
+ if (algorithm == null || algorithm.isEmpty()) {
throw new IllegalArgumentException("No algorithm name specified");
}
@@ -188,7 +188,7 @@
}
// check the signature algorithm with parameters
- if (algorithm != null && algorithm.length() != 0) {
+ if (algorithm != null && !algorithm.isEmpty()) {
if (!permits(primitives, algorithm, parameters)) {
return false;
}