< prev index next >
src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/AtomicContext.java
Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
@@ -241,11 +241,11 @@
}
protected boolean isEmpty(String name) {
- return name == null || name.equals("");
+ return name == null || name.isEmpty();
}
// ------ implementations of c_ and c_*_nns methods using
// ------ the corresponding a_ and a_*_nns methods
@@ -508,11 +508,11 @@
* If name is already empty, then throw NameNotFoundException because
* this context by default does not have any nns.
*/
protected void a_processJunction_nns(String name, Continuation cont)
throws NamingException {
- if (name.equals("")) {
+ if (name.isEmpty()) {
NameNotFoundException e = new NameNotFoundException();
cont.setErrorNNS(this, name);
throw cont.fillInException(e);
}
try {
< prev index next >