--- old/src/java.base/share/classes/java/security/Provider.java 2015-04-23 15:28:06.356132405 -0700 +++ new/src/java.base/share/classes/java/security/Provider.java 2015-04-23 15:28:06.000132397 -0700 @@ -711,7 +711,7 @@ legacyChanged = true; if (legacyStrings == null) { - legacyStrings = new LinkedHashMap(); + legacyStrings = new LinkedHashMap<>(); } return true; } @@ -773,7 +773,7 @@ private void implReplaceAll(BiFunction function) { legacyChanged = true; if (legacyStrings == null) { - legacyStrings = new LinkedHashMap(); + legacyStrings = new LinkedHashMap<>(); } else { legacyStrings.replaceAll((BiFunction) function); } @@ -905,7 +905,7 @@ } serviceSet = null; if (legacyMap == null) { - legacyMap = new LinkedHashMap(); + legacyMap = new LinkedHashMap<>(); } else { legacyMap.clear(); } @@ -1133,7 +1133,7 @@ ("service.getProvider() must match this Provider object"); } if (serviceMap == null) { - serviceMap = new LinkedHashMap(); + serviceMap = new LinkedHashMap<>(); } servicesChanged = true; String type = s.getType(); @@ -1305,7 +1305,7 @@ } static { - knownEngines = new HashMap(); + knownEngines = new HashMap<>(); // JCA addEngine("AlgorithmParameterGenerator", false, null); addEngine("AlgorithmParameters", false, null); @@ -1431,14 +1431,14 @@ private void addAlias(String alias) { if (aliases.isEmpty()) { - aliases = new ArrayList(2); + aliases = new ArrayList<>(2); } aliases.add(alias); } void addAttribute(String type, String value) { if (attributes.isEmpty()) { - attributes = new HashMap(8); + attributes = new HashMap<>(8); } attributes.put(new UString(type), value); } @@ -1471,12 +1471,12 @@ if (aliases == null) { this.aliases = Collections.emptyList(); } else { - this.aliases = new ArrayList(aliases); + this.aliases = new ArrayList<>(aliases); } if (attributes == null) { this.attributes = Collections.emptyMap(); } else { - this.attributes = new HashMap(); + this.attributes = new HashMap<>(); for (Map.Entry entry : attributes.entrySet()) { this.attributes.put(new UString(entry.getKey()), entry.getValue()); } @@ -1644,7 +1644,7 @@ ("class configured for " + type + " (provider: " + provider.getName() + ") is not public."); } - classRef = new WeakReference>(clazz); + classRef = new WeakReference<>(clazz); } return clazz; } catch (ClassNotFoundException e) {