6850402: Deadlock on sun.security.jca.ProviderConfig starting from jdk7-b55
Reduced the scope of locking Reviewed-by: vinnie
This commit is contained in:
parent
fa55c66665
commit
982b899b40
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user