< prev index next >

src/java.base/share/classes/sun/security/x509/IPAddressName.java

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

*** 123,133 **** * @throws IOException if name can not be converted to a valid IPv4 or IPv6 * address */ public IPAddressName(String name) throws IOException { ! if (name == null || name.length() == 0) { throw new IOException("IPAddress cannot be null or empty"); } if (name.charAt(name.length() - 1) == '/') { throw new IOException("Invalid IPAddress: " + name); } --- 123,133 ---- * @throws IOException if name can not be converted to a valid IPv4 or IPv6 * address */ public IPAddressName(String name) throws IOException { ! if (name == null || name.isEmpty()) { throw new IOException("IPAddress cannot be null or empty"); } if (name.charAt(name.length() - 1) == '/') { throw new IOException("Invalid IPAddress: " + name); }
< prev index next >