< prev index next >
src/java.base/share/classes/sun/security/jca/GetInstance.java
Print this page
rev 51919 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb
@@ -73,11 +73,11 @@
}
public static Service getService(String type, String algorithm,
String provider) throws NoSuchAlgorithmException,
NoSuchProviderException {
- if ((provider == null) || (provider.length() == 0)) {
+ if (provider == null || provider.isEmpty()) {
throw new IllegalArgumentException("missing provider");
}
Provider p = Providers.getProviderList().getProvider(provider);
if (p == null) {
throw new NoSuchProviderException("no such provider: " + provider);
< prev index next >