changeset 1393:d0ce095004b2

6453837: PartialCompositeContext.allEmpty is buggy Reviewed-by: weijun
author xuelei
date Mon, 13 Jul 2009 23:01:03 +0800
parents 880896883a47
children beb5e5cad3ae
files src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java	Sat Jul 11 16:43:08 2009 +0100
+++ b/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<String> enum_ = name.getAll();
         while (enum_.hasMoreElements()) {
-            if (!enum_.equals("")) {
+            if (!enum_.nextElement().isEmpty()) {
                 return false;
             }
         }