diff -r ec76fe03fdd4 -r 57019dc81b66 jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java --- a/jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java Fri Jan 14 22:34:31 2011 +0000 +++ b/jdk/src/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java Fri Jan 14 15:31:45 2011 -0800 @@ -153,8 +153,7 @@ static Collection getSupportedAlgorithms(AlgorithmConstraints constraints) { - Collection supported = - new ArrayList(); + Collection supported = new ArrayList<>(); synchronized (priorityMap) { for (SignatureAndHashAlgorithm sigAlg : priorityMap.values()) { if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM && @@ -171,8 +170,7 @@ // Get supported algorithm collection from an untrusted collection static Collection getSupportedAlgorithms( Collection algorithms ) { - Collection supported = - new ArrayList(); + Collection supported = new ArrayList<>(); for (SignatureAndHashAlgorithm sigAlg : algorithms) { if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM) { supported.add(sigAlg); @@ -184,7 +182,7 @@ static String[] getAlgorithmNames( Collection algorithms) { - ArrayList algorithmNames = new ArrayList(); + ArrayList algorithmNames = new ArrayList<>(); if (algorithms != null) { for (SignatureAndHashAlgorithm sigAlg : algorithms) { algorithmNames.add(sigAlg.algorithm); @@ -197,7 +195,7 @@ static Set getHashAlgorithmNames( Collection algorithms) { - Set algorithmNames = new HashSet(); + Set algorithmNames = new HashSet<>(); if (algorithms != null) { for (SignatureAndHashAlgorithm sigAlg : algorithms) { if (sigAlg.hash.value > 0) {