< 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,251 **** } protected boolean isEmpty(String name) { ! return name == null || name.equals(""); } // ------ implementations of c_ and c_*_nns methods using // ------ the corresponding a_ and a_*_nns methods --- 241,251 ---- } protected boolean isEmpty(String name) { ! return name == null || name.isEmpty(); } // ------ implementations of c_ and c_*_nns methods using // ------ the corresponding a_ and a_*_nns methods
*** 508,518 **** * 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("")) { NameNotFoundException e = new NameNotFoundException(); cont.setErrorNNS(this, name); throw cont.fillInException(e); } try { --- 508,518 ---- * 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.isEmpty()) { NameNotFoundException e = new NameNotFoundException(); cont.setErrorNNS(this, name); throw cont.fillInException(e); } try {
< prev index next >