1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Simplify.

This commit is contained in:
Cedric Beust 2015-11-15 14:42:26 -08:00
parent 663a756511
commit 087cb81e08

View file

@ -24,8 +24,7 @@ abstract class GenericTestRunner(open val project: Project, open val classpath:
// Only keep classes with a parameterless constructor
val urls = arrayOf(File(path).toURI().toURL()) +
classpath.map { it.jarFile.get().toURI().toURL() }
val classLoader = URLClassLoader(urls)
classLoader.loadClass(it).getConstructor()
URLClassLoader(urls).loadClass(it).getConstructor()
true
} catch(ex: Exception) {
log(2, "Skipping non test class $it: ${ex.message}")