changeset 20827:29e3da385ed2

8020696: Merge problem for KdcComm.java Reviewed-by: chegar
author weijun
date Wed, 17 Jul 2013 18:46:00 +0800
parents d9ee83c801f6
children 7d54086945dd
files jdk/src/share/classes/sun/security/krb5/KdcComm.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/share/classes/sun/security/krb5/KdcComm.java	Tue Jul 23 09:30:58 2013 +0400
+++ b/jdk/src/share/classes/sun/security/krb5/KdcComm.java	Wed Jul 17 18:46:00 2013 +0800
@@ -227,15 +227,15 @@
         try {
             ibuf = sendIfPossible(obuf, tempKdc.next(), useTCP);
         } catch(Exception first) {
+            boolean ok = false;
             while(tempKdc.hasNext()) {
                 try {
                     ibuf = sendIfPossible(obuf, tempKdc.next(), useTCP);
-                    if (ibuf != null) {
-                        return ibuf;
-                    }
+                    ok = true;
+                    break;
                 } catch(Exception ignore) {}
             }
-            throw first;
+            if (!ok) throw first;
         }
         if (ibuf == null) {
             throw new IOException("Cannot get a KDC reply");