8080911: sun/security/krb5/auto/UseCacheAndStoreKey.java timed out intermittently
authorweijun
Tue, 26 May 2015 22:10:37 +0800
changeset 30796 6d090852a86a
parent 30795 7fff87625aba
child 30797 9cf3d0361db4
8080911: sun/security/krb5/auto/UseCacheAndStoreKey.java timed out intermittently Reviewed-by: xuelei
jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Tue May 26 10:43:53 2015 +0200
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Tue May 26 22:10:37 2015 +0800
@@ -110,8 +110,10 @@
      * java.security.krb5.kdc not specified, error reading configuration file.
      */
 
-    public static synchronized void refresh() throws KrbException {
-        singleton = new Config();
+    public static void refresh() throws KrbException {
+        synchronized (Config.class) {
+            singleton = new Config();
+        }
         KdcComm.initStatic();
         EType.initStatic();
         Checksum.initStatic();