mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 20:44:41 +02:00
6996372: synchronizing handshaking hash
Remove the unnecessary synchronization. Also reviewed by David Schlosnagle (schlosna@gmail.com) Reviewed-by: weijun
This commit is contained in:
parent
6c68dd5523
commit
03b36bd454
1 changed files with 6 additions and 4 deletions
|
@ -59,10 +59,10 @@ public class DisabledAlgorithmConstraints implements AlgorithmConstraints {
|
|||
public final static String PROPERTY_TLS_DISABLED_ALGS =
|
||||
"jdk.tls.disabledAlgorithms";
|
||||
|
||||
private static Map<String, String[]> disabledAlgorithmsMap =
|
||||
Collections.synchronizedMap(new HashMap<String, String[]>());
|
||||
private static Map<String, KeySizeConstraints> keySizeConstraintsMap =
|
||||
Collections.synchronizedMap(new HashMap<String, KeySizeConstraints>());
|
||||
private final static Map<String, String[]> disabledAlgorithmsMap =
|
||||
new HashMap<>();
|
||||
private final static Map<String, KeySizeConstraints> keySizeConstraintsMap =
|
||||
new HashMap<>();
|
||||
|
||||
private String[] disabledAlgorithms;
|
||||
private KeySizeConstraints keySizeConstraints;
|
||||
|
@ -74,6 +74,8 @@ public class DisabledAlgorithmConstraints implements AlgorithmConstraints {
|
|||
* algorithm constraints
|
||||
*/
|
||||
public DisabledAlgorithmConstraints(String propertyName) {
|
||||
// Both disabledAlgorithmsMap and keySizeConstraintsMap are
|
||||
// synchronized with the lock of disabledAlgorithmsMap.
|
||||
synchronized (disabledAlgorithmsMap) {
|
||||
if(!disabledAlgorithmsMap.containsKey(propertyName)) {
|
||||
loadDisabledAlgorithmsMap(propertyName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue