From adf268747c4627968329fb223d5286f5400402b6 Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 16:58:26 +0800
Subject: 8080911: sun/security/krb5/auto/UseCacheAndStoreKey.java timed out intermittently

Summary: <Corelib>: backport JDK-8080911
LLT: NA
Bug url: https://bugs.openjdk.java.net/browse/JDK-8080911
---
 jdk/src/share/classes/sun/security/krb5/Config.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/jdk/src/share/classes/sun/security/krb5/Config.java b/jdk/src/share/classes/sun/security/krb5/Config.java
index ec19a3029..117acb840 100644
--- a/jdk/src/share/classes/sun/security/krb5/Config.java
+++ b/jdk/src/share/classes/sun/security/krb5/Config.java
@@ -146,8 +146,10 @@ public class Config {
      * 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();
-- 
2.19.0

