jdk/src/share/classes/java/util/ServiceLoader.java
changeset 14228 131a42bc2c20
parent 14218 c6f2434dd88d
parent 14016 56be5085fc31
child 14229 40fbffe104bd
--- a/jdk/src/share/classes/java/util/ServiceLoader.java	Thu Oct 11 15:30:23 2012 -0700
+++ b/jdk/src/share/classes/java/util/ServiceLoader.java	Thu Oct 18 22:01:26 2012 -0700
@@ -213,7 +213,7 @@
     }
 
     private ServiceLoader(Class<S> svc, ClassLoader cl) {
-        service = svc;
+        service = Objects.requireNonNull(svc, "Service interface cannot be null");
         loader = cl;
         reload();
     }