From 103c97f7deef02d81d6d87c21f751899c63683b1 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 26 May 2009 18:12:53 +0000 Subject: 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. --- src/partest/scala/tools/partest/nest/CompileManager.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/partest') 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() } } -- cgit v1.2.3