From f0ca73e8d2d9778fc2966aeceab59a67c4d5228d Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Fri, 27 Nov 2015 05:29:02 -0800 Subject: [PATCH] Minor fixes. --- .../com/beust/kobalt/wrapper/ParentLastClassLoader.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/wrapper/ParentLastClassLoader.kt b/src/main/kotlin/com/beust/kobalt/wrapper/ParentLastClassLoader.kt index a8a98c02..6c25abb8 100644 --- a/src/main/kotlin/com/beust/kobalt/wrapper/ParentLastClassLoader.kt +++ b/src/main/kotlin/com/beust/kobalt/wrapper/ParentLastClassLoader.kt @@ -10,17 +10,16 @@ import java.net.URLClassLoader * being inside Kobalt itself. */ public class ParentLastClassLoader(val classpath: List) - : ClassLoader(Thread.currentThread().getContextClassLoader()) { + : ClassLoader(Thread.currentThread().contextClassLoader) { private val childClassLoader: ChildURLClassLoader init { val urls : Array = classpath.toTypedArray() - childClassLoader = ChildURLClassLoader(urls, FindClassClassLoader(this.getParent()) ) + childClassLoader = ChildURLClassLoader(urls, FindClassClassLoader(this.parent) ) } - -/** - * This class allows me to call findClass on a classloader + /** + * This class makes it possible to call findClass on a classloader */ private class FindClassClassLoader(parent: ClassLoader) : ClassLoader(parent) { override public fun findClass(name: String) = super.findClass(name)