diff options
author | michelou <michelou@epfl.ch> | 2007-06-07 13:05:31 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-06-07 13:05:31 +0000 |
commit | 49e3d621210581470436f6ccadd990f7240bd3fe (patch) | |
tree | 5b3922e7f619fb50b408305aedfda100c034bb30 | |
parent | a05f7be40d40c043ab7b42ccaf759fe9ddec554d (diff) | |
download | scala-49e3d621210581470436f6ccadd990f7240bd3fe.tar.gz scala-49e3d621210581470436f6ccadd990f7240bd3fe.tar.bz2 scala-49e3d621210581470436f6ccadd990f7240bd3fe.zip |
user decides to add a SecurityManager or not
-rw-r--r-- | src/compiler/scala/tools/nsc/MainGenericRunner.scala | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/compiler/scala/tools/nsc/MainGenericRunner.scala b/src/compiler/scala/tools/nsc/MainGenericRunner.scala index c5b903066f..7846ed847c 100644 --- a/src/compiler/scala/tools/nsc/MainGenericRunner.scala +++ b/src/compiler/scala/tools/nsc/MainGenericRunner.scala @@ -101,22 +101,12 @@ object MainGenericRunner { try { Some(new URL(spec)) } catch { case e => Console.println(e); None } - def urls(specs: String): List[URL] = { - val urls = - if (specs == null || specs.length == 0) Nil - else for ( - spec <- specs.split(" ").toList; - val url = specToURL(spec); if !url.isEmpty - ) yield url.get - if (!urls.isEmpty && (System.getSecurityManager == null)) { - // Here we require a security manager to be present ! - // Security permissions are defined in a user-defined - // file to be specified in the environment variable - // JAVA_OPTS="-Djava.security.policy=scala.policy" - System.setSecurityManager(new SecurityManager()) - } - urls - } + def urls(specs: String): List[URL] = + if (specs == null || specs.length == 0) Nil + else for ( + spec <- specs.split(" ").toList; + val url = specToURL(spec); if !url.isEmpty + ) yield url.get val classpath: List[URL] = paths(settings.bootclasspath.value) ::: |