# HG changeset patch # User xuelei # Date 1247497263 -28800 # Node ID a3484e08f2bc173751b6602d08435c0bd12348c2 # Parent b142b3d06bf519c8946f4be68e4a6464e1839640 6453837: PartialCompositeContext.allEmpty is buggy Reviewed-by: weijun diff -r b142b3d06bf5 -r a3484e08f2bc jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java --- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java Sat Jul 11 16:43:08 2009 +0100 +++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java Mon Jul 13 23:01:03 2009 +0800 @@ -493,9 +493,9 @@ * 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; } }