changeset 30796:6d090852a86a

8080911: sun/security/krb5/auto/UseCacheAndStoreKey.java timed out intermittently Reviewed-by: xuelei
author weijun
date Tue, 26 May 2015 22:10:37 +0800
parents 7fff87625aba
children 9cf3d0361db4
files jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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();