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

Issues with SignatureAndHashAlgorithm.getSupportedAlgorithms

    Details

      Backports

        Description

        The synchronization in the SignatureAndHashAlgorithm.getSupportedAlgorithms() method is not necessary:
        -------------------
            static Collection<SignatureAndHashAlgorithm>
                    getSupportedAlgorithms(AlgorithmConstraints constraints) {

                Collection<SignatureAndHashAlgorithm> supported = new ArrayList<>();
                synchronized (priorityMap) {
                    for (SignatureAndHashAlgorithm sigAlg : priorityMap.values()) {
                        if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM &&
                                constraints.permits(SIGNATURE_PRIMITIVE_SET,
                                        sigAlg.algorithm, null)) {
                            supported.add(sigAlg);
                        }
                    }
                }

                return supported;
            }
        -------------------

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  xuelei Xue-Lei Fan
                  Reporter:
                  xuelei Xue-Lei Fan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: