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;
            }
        -------------------

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/daaace32c979
            User: xuelei
            Date: 2016-01-09 13:02:55 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/daaace32c979 User: xuelei Date: 2016-01-09 13:02:55 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/daaace32c979
            User: lana
            Date: 2016-01-20 20:51:00 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/daaace32c979 User: lana Date: 2016-01-20 20:51:00 +0000

              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: