--- old/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CodeStore.java 2016-02-12 13:00:05.404614505 +0100 +++ new/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/CodeStore.java 2016-02-12 13:00:05.312614506 +0100 @@ -54,11 +54,6 @@ @Logger(name="codestore") public abstract class CodeStore implements Loggable { - /** - * Permission needed to provide a CodeStore instance via ServiceLoader. - */ - public final static String NASHORN_PROVIDE_CODE_STORE = "nashorn.provideCodeStore"; - private DebugLogger log; /** @@ -85,23 +80,6 @@ * @return The instance, or null if code store could not be created */ public static CodeStore newCodeStore(final Context context) { - final Class baseClass = CodeStore.class; - try { - // security check first - final SecurityManager sm = System.getSecurityManager(); - if (sm != null) { - sm.checkPermission(new RuntimePermission(NASHORN_PROVIDE_CODE_STORE)); - } - final ServiceLoader services = ServiceLoader.load(baseClass); - final Iterator iterator = services.iterator(); - if (iterator.hasNext()) { - final CodeStore store = iterator.next(); - store.initLogger(context).info("using code store provider ", store.getClass().getCanonicalName()); - return store; - } - } catch (final AccessControlException e) { - context.getLogger(CodeStore.class).warning("failed to load code store provider ", e); - } try { final CodeStore store = new DirectoryCodeStore(context); store.initLogger(context);