mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Simplify.
This commit is contained in:
parent
663a756511
commit
087cb81e08
1 changed files with 1 additions and 2 deletions
|
@ -24,8 +24,7 @@ abstract class GenericTestRunner(open val project: Project, open val classpath:
|
||||||
// Only keep classes with a parameterless constructor
|
// Only keep classes with a parameterless constructor
|
||||||
val urls = arrayOf(File(path).toURI().toURL()) +
|
val urls = arrayOf(File(path).toURI().toURL()) +
|
||||||
classpath.map { it.jarFile.get().toURI().toURL() }
|
classpath.map { it.jarFile.get().toURI().toURL() }
|
||||||
val classLoader = URLClassLoader(urls)
|
URLClassLoader(urls).loadClass(it).getConstructor()
|
||||||
classLoader.loadClass(it).getConstructor()
|
|
||||||
true
|
true
|
||||||
} catch(ex: Exception) {
|
} catch(ex: Exception) {
|
||||||
log(2, "Skipping non test class $it: ${ex.message}")
|
log(2, "Skipping non test class $it: ${ex.message}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue