8146725: Issues with SignatureAndHashAlgorithm.getSupportedAlgorithms
authorxuelei
Sat, 09 Jan 2016 13:02:22 +0000
changeset 34937 17d60670c834
parent 34936 784268ce3fe2
child 34938 7346fb82f58f
8146725: Issues with SignatureAndHashAlgorithm.getSupportedAlgorithms Reviewed-by: weijun, wetmore
jdk/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Fri Jan 08 17:52:54 2016 -0800
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java	Sat Jan 09 13:02:22 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -153,13 +153,11 @@
             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);
-                }
+        for (SignatureAndHashAlgorithm sigAlg : priorityMap.values()) {
+            if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM &&
+                    constraints.permits(SIGNATURE_PRIMITIVE_SET,
+                            sigAlg.algorithm, null)) {
+                supported.add(sigAlg);
             }
         }