Reduce synchronization in DisabledAlgorithmConstraints

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: