Use String.isEmpty() instead of String.equals("")
This commit is contained in:
committed by
Juergen Hoeller
parent
bb2e3ce6d1
commit
1f3b595a03
@@ -126,7 +126,7 @@ public class SimpleNamingContext implements Context {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Static JNDI lookup: [" + name + "]");
|
||||
}
|
||||
if ("".equals(name)) {
|
||||
if (name.isEmpty()) {
|
||||
return new SimpleNamingContext(this.root, this.boundObjects, this.environment);
|
||||
}
|
||||
Object found = this.boundObjects.get(name);
|
||||
@@ -306,7 +306,7 @@ public class SimpleNamingContext implements Context {
|
||||
private Iterator<T> iterator;
|
||||
|
||||
private AbstractNamingEnumeration(SimpleNamingContext context, String proot) throws NamingException {
|
||||
if (!"".equals(proot) && !proot.endsWith("/")) {
|
||||
if (!proot.isEmpty() && !proot.endsWith("/")) {
|
||||
proot = proot + "/";
|
||||
}
|
||||
String root = context.root + proot;
|
||||
|
||||
Reference in New Issue
Block a user