8020696: Merge problem for KdcComm.java
authorweijun
Wed, 17 Jul 2013 18:46:00 +0800
changeset 20827 29e3da385ed2
parent 20826 d9ee83c801f6
child 20828 7d54086945dd
8020696: Merge problem for KdcComm.java Reviewed-by: chegar
jdk/src/share/classes/sun/security/krb5/KdcComm.java
--- 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");