< prev index next >

src/java.base/share/classes/com/sun/net/ssl/SSLContext.java

Print this page
rev 51919 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb

*** 107,117 **** * been configured. */ public static SSLContext getInstance(String protocol, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { ! if (provider == null || provider.length() == 0) throw new IllegalArgumentException("missing provider"); Object[] objs = SSLSecurity.getImpl(protocol, "SSLContext", provider); return new SSLContext((SSLContextSpi)objs[0], (Provider)objs[1], protocol); --- 107,117 ---- * been configured. */ public static SSLContext getInstance(String protocol, String provider) throws NoSuchAlgorithmException, NoSuchProviderException { ! if (provider == null || provider.isEmpty()) throw new IllegalArgumentException("missing provider"); Object[] objs = SSLSecurity.getImpl(protocol, "SSLContext", provider); return new SSLContext((SSLContextSpi)objs[0], (Provider)objs[1], protocol);
< prev index next >