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.