diff options
author | Paul Phillips <paulp@improving.org> | 2009-05-26 18:12:53 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-05-26 18:12:53 +0000 |
commit | 103c97f7deef02d81d6d87c21f751899c63683b1 (patch) | |
tree | 50680eb96e39e016f28df03582164cce1b73d5e2 /src/partest | |
parent | 5e12bab4777dc63711834cd39bf8514fb7e8da40 (diff) | |
download | scala-103c97f7deef02d81d6d87c21f751899c63683b1.tar.gz scala-103c97f7deef02d81d6d87c21f751899c63683b1.tar.bz2 scala-103c97f7deef02d81d6d87c21f751899c63683b1.zip |
A big yet interim patch emerging from my attemp...
A big yet interim patch emerging from my attempts to centralize common
classloader-related code. As it turns out, not that much of the
patch is directly associated with that. Most of it is cleanup in the
neighborhoods I was visiting, but there are a few new library files
about which I'm open to feedback:
scala/util/control/Exception - lots of exception handling code.
scala/net/Utility - what would be the first file in scala.net.*,
more code to follow if that sounds like a good package idea.
scala/util/ScalaClassLoader - mostly convenience methods right
now, more sophistication to come
Also, this adds a :jar command to the repl which adds a jar to your
classpath and replays the session.
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/nest/CompileManager.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/partest/scala/tools/partest/nest/CompileManager.scala b/src/partest/scala/tools/partest/nest/CompileManager.scala index d33eee1ccd..f7612823fc 100644 --- a/src/partest/scala/tools/partest/nest/CompileManager.scala +++ b/src/partest/scala/tools/partest/nest/CompileManager.scala @@ -157,9 +157,9 @@ class ReflectiveCompiler(val fileManager: ConsoleFileManager) extends SimpleComp val fileClass = Class.forName("java.io.File") val stringClass = Class.forName("java.lang.String") val sepCompileMethod = - sepCompilerClass.getMethod("compile", Array(fileClass, stringClass): _*) + sepCompilerClass.getMethod("compile", fileClass, stringClass) val sepCompileMethod2 = - sepCompilerClass.getMethod("compile", Array(fileClass, stringClass, fileClass): _*) + sepCompilerClass.getMethod("compile", fileClass, stringClass, fileClass) /* This method throws java.lang.reflect.InvocationTargetException * if the compiler crashes. @@ -167,8 +167,7 @@ class ReflectiveCompiler(val fileManager: ConsoleFileManager) extends SimpleComp * methods of class CompileManager. */ def compile(out: Option[File], files: List[File], kind: String, log: File): Boolean = { - val fileArgs: Array[AnyRef] = Array(out, files, kind, log) - val res = sepCompileMethod2.invoke(sepCompiler, fileArgs: _*).asInstanceOf[java.lang.Boolean] + val res = sepCompileMethod2.invoke(sepCompiler, out, files, kind, log).asInstanceOf[java.lang.Boolean] res.booleanValue() } } |