diff -r e10a1f7aaa13 -r 8bf9268df0e2 src/java.base/share/classes/javax/crypto/Cipher.java --- a/src/java.base/share/classes/javax/crypto/Cipher.java Thu Dec 13 16:14:07 2018 +0100 +++ b/src/java.base/share/classes/javax/crypto/Cipher.java Thu Dec 13 15:31:05 2018 +0100 @@ -341,7 +341,7 @@ throw new NoSuchAlgorithmException("Invalid transformation " + "format:" + transformation); } - if ((parts[0] == null) || (parts[0].length() == 0)) { + if ((parts[0] == null) || (parts[0].isEmpty())) { throw new NoSuchAlgorithmException("Invalid transformation:" + "algorithm not specified-" + transformation); @@ -445,10 +445,10 @@ String alg = parts[0]; String mode = parts[1]; String pad = parts[2]; - if ((mode != null) && (mode.length() == 0)) { + if ((mode != null) && (mode.isEmpty())) { mode = null; } - if ((pad != null) && (pad.length() == 0)) { + if ((pad != null) && (pad.isEmpty())) { pad = null; } @@ -634,7 +634,7 @@ if ((transformation == null) || transformation.isEmpty()) { throw new NoSuchAlgorithmException("Null or empty transformation"); } - if ((provider == null) || (provider.length() == 0)) { + if ((provider == null) || (provider.isEmpty())) { throw new IllegalArgumentException("Missing provider"); } Provider p = Security.getProvider(provider);