# HG changeset patch # User xuelei # Date 1452344542 0 # Node ID 17d60670c83499e593c68da23052deef27831b7a # Parent 784268ce3fe248e422e152f021847b13559e4401 8146725: Issues with SignatureAndHashAlgorithm.getSupportedAlgorithms Reviewed-by: weijun, wetmore diff -r 784268ce3fe2 -r 17d60670c834 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 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); } }