summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ObjectRunner.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/ObjectRunner.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ObjectRunner.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ObjectRunner.scala b/src/compiler/scala/tools/nsc/ObjectRunner.scala
index befdddef9b..3644fb7297 100644
--- a/src/compiler/scala/tools/nsc/ObjectRunner.scala
+++ b/src/compiler/scala/tools/nsc/ObjectRunner.scala
@@ -67,12 +67,12 @@ object ObjectRunner {
case None => throw new ClassNotFoundException(objectName)
}
- val method = clsToRun.getMethod("main", List(classOf[Array[String]]).toArray)
+ val method = clsToRun.getMethod("main", classOf[Array[String]])
if ((method.getModifiers & Modifier.STATIC) == 0)
throw new NoSuchMethodException(objectName + ".main is not static")
withContextClassLoader(loader) {
- method.invoke(null, List(arguments.toArray).toArray)
+ method.invoke(null, List(arguments.toArray).toArray: _*)
}
}
}