diff -r f771d5fb3b27 -r 56be5085fc31 jdk/src/share/classes/java/util/ServiceLoader.java --- a/jdk/src/share/classes/java/util/ServiceLoader.java Tue Oct 02 10:11:57 2012 +0100 +++ b/jdk/src/share/classes/java/util/ServiceLoader.java Tue Oct 02 10:36:05 2012 +0100 @@ -213,7 +213,7 @@ } private ServiceLoader(Class svc, ClassLoader cl) { - service = svc; + service = Objects.requireNonNull(svc, "Service interface cannot be null"); loader = cl; reload(); }