jdk/src/share/classes/java/util/ServiceLoader.java
changeset 7803 56bc97d69d93
parent 5506 202f599c92aa
child 9035 1255eb81cc2f
--- a/jdk/src/share/classes/java/util/ServiceLoader.java	Sat Dec 18 09:10:49 2010 -0800
+++ b/jdk/src/share/classes/java/util/ServiceLoader.java	Mon Dec 20 13:47:04 2010 -0800
@@ -191,7 +191,7 @@
     private ClassLoader loader;
 
     // Cached providers, in instantiation order
-    private LinkedHashMap<String,S> providers = new LinkedHashMap<String,S>();
+    private LinkedHashMap<String,S> providers = new LinkedHashMap<>();
 
     // The current lazy-lookup iterator
     private LazyIterator lookupIterator;
@@ -291,7 +291,7 @@
     {
         InputStream in = null;
         BufferedReader r = null;
-        ArrayList<String> names = new ArrayList<String>();
+        ArrayList<String> names = new ArrayList<>();
         try {
             in = u.openStream();
             r = new BufferedReader(new InputStreamReader(in, "utf-8"));
@@ -463,7 +463,7 @@
     public static <S> ServiceLoader<S> load(Class<S> service,
                                             ClassLoader loader)
     {
-        return new ServiceLoader<S>(service, loader);
+        return new ServiceLoader<>(service, loader);
     }
 
     /**