JDK-8150455 : Reduce synchronization in DisabledAlgorithmConstraints
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: java.security
  • Priority: P4
  • Status: Closed
  • Resolution: Other
  • Submitted: 2016-02-23
  • Updated: 2016-02-23
  • Resolved: 2016-02-23
Related Reports
Relates :  
Description
Some of the synchronization code in sun.security.util.DisabledAlgorithmConstraints seems to be unnecessary, in particular:

1. The synchronized static Maps which map the security properties to the algorithms/constraints.  DisabledAlgorithmConstraints, once created, is essentially immutable so each instance can be created for a specific property. Also, the callers who create these objects already cache them in static fields such that they are created once and re-used.

2. The synchronization around the Map in KeySizeConstraints - this map is created in the constructor and never modified afterwards, so there is no need to synchronize access to it.

Comments
This issue will be fixed as part of JDK-8140422, so I am closing this out.
23-02-2016