src/share/classes/sun/module/repository/RepositoryConfig.java
Print this page
@@ -32,11 +32,10 @@
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.module.Modules;
-import java.module.ModuleSystemPermission;
import java.module.Repository;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.net.URLClassLoader;
@@ -140,24 +139,14 @@
new HashMap<String, RepositoryFactory>();
/**
* Sets the application repository.
* @param r {@code Repository} that will be the application repository
- * SecurityException if a security manager exists and its
- * <tt>checkPermission</tt> method denies access to shutdown the
- * repository.
* @throws IllegalArgumentException if the application repository has already
* been set via this method.
- * @throws SecurityException if a security manager exists and its
- * {@code checkPermission} method denies access to set the system
- * repository.
*/
public static void setApplicationRepository(Repository r) throws IllegalArgumentException {
- SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- sm.checkPermission(new ModuleSystemPermission("setApplicationRepository"));
- }
if (applicationRepositoryWasSet) {
throw new IllegalArgumentException("Application repository is already set.");
} else {
applicationRepository = r;
applicationRepositoryWasSet = true;