< prev index next >

src/java.naming/share/classes/com/sun/jndi/ldap/LdapReferralContext.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

*** 180,190 **** } if (urlString == null) { urlName = null; } else { ! urlName = urlString.equals("") ? new CompositeName() : new CompositeName().add(urlString); } } --- 180,190 ---- } if (urlString == null) { urlName = null; } else { ! urlName = urlString.isEmpty() ? new CompositeName() : new CompositeName().add(urlString); } }
*** 886,896 **** return ((LdapContext)refCtx).getResponseControls(); } // ---------------------- Private methods --------------------- private Name toName(String name) throws InvalidNameException { ! return name.equals("") ? new CompositeName() : new CompositeName().add(name); } /* * Use the DN component from the LDAP URL (if present) to override the --- 886,896 ---- return ((LdapContext)refCtx).getResponseControls(); } // ---------------------- Private methods --------------------- private Name toName(String name) throws InvalidNameException { ! return name.isEmpty() ? new CompositeName() : new CompositeName().add(name); } /* * Use the DN component from the LDAP URL (if present) to override the
< prev index next >