diff options
author | michelou <michelou@epfl.ch> | 2007-06-07 12:46:49 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2007-06-07 12:46:49 +0000 |
commit | c66f4b816233ddac84b6bfd80589dda505e1fe44 (patch) | |
tree | b7012ee8cc42d16cd1ad47d86832dbd8ca806fdc /src/compiler | |
parent | 90fed9c4846f4549099e8c0c8ce2a7683004a92f (diff) | |
download | scala-c66f4b816233ddac84b6bfd80589dda505e1fe44.tar.gz scala-c66f4b816233ddac84b6bfd80589dda505e1fe44.tar.bz2 scala-c66f4b816233ddac84b6bfd80589dda505e1fe44.zip |
user decides to add a SecurityManager or not
Diffstat (limited to 'src/compiler')
-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 ac895cea6f..b8e9e7e3f8 100644 --- a/src/compiler/scala/tools/nsc/MainGenericRunner.scala +++ b/src/compiler/scala/tools/nsc/MainGenericRunner.scala @@ -113,22 +113,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) ::: |