change in ObjectRunner to avoid the warnings.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@15510 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
25549d6f91
commit
1614bc995a
|
@ -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: _*)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue