--- old/src/java.base/share/classes/java/security/cert/PKIXParameters.java 2015-04-23 15:28:16.588132642 -0700 +++ new/src/java.base/share/classes/java/security/cert/PKIXParameters.java 2015-04-23 15:28:16.240132634 -0700 @@ -120,8 +120,8 @@ setTrustAnchors(trustAnchors); this.unmodInitialPolicies = Collections.emptySet(); - this.certPathCheckers = new ArrayList(); - this.certStores = new ArrayList(); + this.certPathCheckers = new ArrayList<>(); + this.certStores = new ArrayList<>(); } /** @@ -144,7 +144,7 @@ if (keystore == null) throw new NullPointerException("the keystore parameter must be " + "non-null"); - Set hashSet = new HashSet(); + Set hashSet = new HashSet<>(); Enumeration aliases = keystore.aliases(); while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); @@ -156,8 +156,8 @@ } setTrustAnchors(hashSet); this.unmodInitialPolicies = Collections.emptySet(); - this.certPathCheckers = new ArrayList(); - this.certStores = new ArrayList(); + this.certPathCheckers = new ArrayList<>(); + this.certStores = new ArrayList<>(); } /** @@ -207,7 +207,7 @@ } } this.unmodTrustAnchors = Collections.unmodifiableSet - (new HashSet(trustAnchors)); + (new HashSet<>(trustAnchors)); } /** @@ -256,7 +256,7 @@ + "of type java.lang.String"); } this.unmodInitialPolicies = - Collections.unmodifiableSet(new HashSet(initialPolicies)); + Collections.unmodifiableSet(new HashSet<>(initialPolicies)); } else this.unmodInitialPolicies = Collections.emptySet(); } @@ -280,7 +280,7 @@ */ public void setCertStores(List stores) { if (stores == null) { - this.certStores = new ArrayList(); + this.certStores = new ArrayList<>(); } else { for (Iterator i = stores.iterator(); i.hasNext();) { if (!(i.next() instanceof CertStore)) { @@ -288,7 +288,7 @@ + "of type java.security.cert.CertStore"); } } - this.certStores = new ArrayList(stores); + this.certStores = new ArrayList<>(stores); } } @@ -316,7 +316,7 @@ */ public List getCertStores() { return Collections.unmodifiableList - (new ArrayList(this.certStores)); + (new ArrayList<>(this.certStores)); } /** @@ -544,14 +544,13 @@ */ public void setCertPathCheckers(List checkers) { if (checkers != null) { - List tmpList = - new ArrayList(); + List tmpList = new ArrayList<>(); for (PKIXCertPathChecker checker : checkers) { tmpList.add((PKIXCertPathChecker)checker.clone()); } this.certPathCheckers = tmpList; } else { - this.certPathCheckers = new ArrayList(); + this.certPathCheckers = new ArrayList<>(); } } @@ -567,7 +566,7 @@ * @see #setCertPathCheckers */ public List getCertPathCheckers() { - List tmpList = new ArrayList(); + List tmpList = new ArrayList<>(); for (PKIXCertPathChecker ck : certPathCheckers) { tmpList.add((PKIXCertPathChecker)ck.clone()); } @@ -667,11 +666,11 @@ // must clone these because addCertStore, et al. modify them if (certStores != null) { - copy.certStores = new ArrayList(certStores); + copy.certStores = new ArrayList<>(certStores); } if (certPathCheckers != null) { copy.certPathCheckers = - new ArrayList(certPathCheckers.size()); + new ArrayList<>(certPathCheckers.size()); for (PKIXCertPathChecker checker : certPathCheckers) { copy.certPathCheckers.add( (PKIXCertPathChecker)checker.clone());