< prev index next >

src/java.base/share/classes/java/security/cert/TrustAnchor.java

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

*** 208,218 **** throw new NullPointerException("the pubKey parameter must be " + "non-null"); if (caName == null) throw new NullPointerException("the caName parameter must be " + "non-null"); ! if (caName.length() == 0) throw new IllegalArgumentException("the caName " + "parameter must be a non-empty String"); // check if caName is formatted correctly this.caPrincipal = new X500Principal(caName); this.pubKey = pubKey; --- 208,218 ---- throw new NullPointerException("the pubKey parameter must be " + "non-null"); if (caName == null) throw new NullPointerException("the caName parameter must be " + "non-null"); ! if (caName.isEmpty()) throw new IllegalArgumentException("the caName " + "parameter must be a non-empty String"); // check if caName is formatted correctly this.caPrincipal = new X500Principal(caName); this.pubKey = pubKey;
< prev index next >