diff --git a/src/share/classes/sun/security/jca/Providers.java b/src/share/classes/sun/security/jca/Providers.java index 732c9f37ee4a5927ee9a6f84eb2b0a914aa16566..9e2ad0e9fa9e2eb0216300a84c4238c50e05256a 100644 --- a/src/share/classes/sun/security/jca/Providers.java +++ b/src/share/classes/sun/security/jca/Providers.java @@ -159,15 +159,18 @@ public class Providers { * could not be loaded) removed. This is the list we need to * present to applications. */ - public static synchronized ProviderList getFullProviderList() { - ProviderList list = getThreadProviderList(); - if (list != null) { - ProviderList newList = list.removeInvalid(); - if (newList != list) { - changeThreadProviderList(newList); - list = newList; + public static ProviderList getFullProviderList() { + ProviderList list; + synchronized (Providers.class) { + list = getThreadProviderList(); + if (list != null) { + ProviderList newList = list.removeInvalid(); + if (newList != list) { + changeThreadProviderList(newList); + list = newList; + } + return list; } - return list; } list = getSystemProviderList(); ProviderList newList = list.removeInvalid();