< 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,11 +180,11 @@
}
if (urlString == null) {
urlName = null;
} else {
- urlName = urlString.equals("") ? new CompositeName() :
+ urlName = urlString.isEmpty() ? new CompositeName() :
new CompositeName().add(urlString);
}
}
@@ -886,11 +886,11 @@
return ((LdapContext)refCtx).getResponseControls();
}
// ---------------------- Private methods ---------------------
private Name toName(String name) throws InvalidNameException {
- return name.equals("") ? new CompositeName() :
+ 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 >