< prev index next >

src/java.base/share/classes/sun/security/jca/GetInstance.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

*** 73,83 **** } public static Service getService(String type, String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { ! if ((provider == null) || (provider.length() == 0)) { throw new IllegalArgumentException("missing provider"); } Provider p = Providers.getProviderList().getProvider(provider); if (p == null) { throw new NoSuchProviderException("no such provider: " + provider); --- 73,83 ---- } public static Service getService(String type, String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { ! 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 >