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:
odersky 2008-07-09 10:54:17 +00:00
parent 25549d6f91
commit 1614bc995a
1 changed files with 2 additions and 2 deletions

View File

@ -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: _*)
}
}
}