< 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()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
*** 136,146 ****
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("")) {
NameParser parser = root.getNameParser("");
Name newName = parser.parse(contextName);
newName.add(oldBinding.getName());
if(debug) {
System.out.println("ContextEnumerator: adding " + newName);
--- 136,146 ----
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.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 >