From cbb1a71a104f7b0166c211bf2eb10cd305b8771a Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Mon, 13 Jul 2009 23:01:03 +0800 Subject: [PATCH] 6453837: PartialCompositeContext.allEmpty is buggy Reviewed-by: weijun --- .../com/sun/jndi/toolkit/ctx/PartialCompositeContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java index 5e7e0e3adce..c7bfcfaae4c 100644 --- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java +++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java @@ -493,9 +493,9 @@ public abstract class PartialCompositeContext implements Context, Resolver { * Tests whether a name contains a nonempty component. */ protected static boolean allEmpty(Name name) { - Enumeration enum_ = name.getAll(); + Enumeration enum_ = name.getAll(); while (enum_.hasMoreElements()) { - if (!enum_.equals("")) { + if (!enum_.nextElement().isEmpty()) { return false; } }