From 087cb81e08c415354012fd39a2458ef8f5d88b70 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sun, 15 Nov 2015 14:42:26 -0800 Subject: [PATCH] Simplify. --- src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt b/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt index 37abea8a..09819ed2 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/GenericRunner.kt @@ -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}")