diff -r 1d0e051daa24 -r dffe8439eb20 jdk/src/share/classes/sun/security/provider/PolicyFile.java --- a/jdk/src/share/classes/sun/security/provider/PolicyFile.java Mon Jan 10 14:43:50 2011 -0500 +++ b/jdk/src/share/classes/sun/security/provider/PolicyFile.java Mon Jan 10 17:06:10 2011 -0800 @@ -299,8 +299,7 @@ private static final int DEFAULT_CACHE_SIZE = 1; // contains the policy grant entries, PD cache, and alias mapping - private AtomicReference policyInfo = - new AtomicReference(); + private AtomicReference policyInfo = new AtomicReference<>(); private boolean constructed = false; private boolean expandProperties = true; @@ -1334,8 +1333,7 @@ List entryPs = entry.getPrincipals(); if (debug != null) { - ArrayList accPs = - new ArrayList(); + ArrayList accPs = new ArrayList<>(); if (principals != null) { for (int i = 0; i < principals.length; i++) { accPs.add(new PolicyParser.PrincipalEntry @@ -1416,8 +1414,7 @@ // check if the PrincipalComparator // implies the current thread's principals - Set pSet = - new HashSet(principals.length); + Set pSet = new HashSet<>(principals.length); for (int j = 0; j < principals.length; j++) { pSet.add(principals[j]); } @@ -1700,7 +1697,7 @@ // build an info array for every principal // in the current domain which has a principal class // that is equal to policy entry principal class name - List plist = new ArrayList(); + List plist = new ArrayList<>(); for (int i = 0; i < pdp.length; i++) { if(pe.principalClass.equals(pdp[i].getClass().getName())) plist.add(pdp[i]); @@ -1770,7 +1767,7 @@ // Done return certs; - ArrayList userCertList = new ArrayList(); + ArrayList userCertList = new ArrayList<>(); i = 0; while (i < certs.length) { userCertList.add(certs[i]); @@ -2234,7 +2231,7 @@ if (this.certs == null) { // extract the signer certs ArrayList signerCerts = - new ArrayList(); + new ArrayList<>(); i = 0; while (i < certs.length) { signerCerts.add(certs[i]);