< prev index next >

src/java.naming/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()

@@ -136,11 +136,11 @@
         Binding newBinding = null;
 
         // if the name is relative, we need to add it to the name of this
         // context to keep it relative w.r.t. the root context we are
         // enumerating
-        if(oldBinding.isRelative() && !contextName.equals("")) {
+        if(oldBinding.isRelative() && !contextName.isEmpty()) {
             NameParser parser = root.getNameParser("");
             Name newName = parser.parse(contextName);
             newName.add(oldBinding.getName());
             if(debug) {
                 System.out.println("ContextEnumerator: adding " + newName);
< prev index next >