--- a/src/java.naming/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java Fri Dec 07 17:11:17 2018 +0100
+++ b/src/java.naming/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java Fri Dec 07 11:51:17 2018 -0500
@@ -138,7 +138,7 @@
// 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());