Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8150455

Reduce synchronization in DisabledAlgorithmConstraints

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Other
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: security-libs
    • Labels:
      None

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ascarpino Anthony Scarpino
                Reporter:
                mullan Sean Mullan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: