diff --git a/cli/src/main/scala-2.11/coursier/cli/Launch.scala b/cli/src/main/scala-2.11/coursier/cli/Launch.scala index 02a3ec1ef..6cec11c28 100644 --- a/cli/src/main/scala-2.11/coursier/cli/Launch.scala +++ b/cli/src/main/scala-2.11/coursier/cli/Launch.scala @@ -33,21 +33,21 @@ object Launch { mainClassLoader(cl.getParent) } - class IsolatedClassLoader( - urls: Array[URL], - parent: ClassLoader, - isolationTargets: Array[String] - ) extends URLClassLoader(urls, parent) { +} - /** - * Applications wanting to access an isolated `ClassLoader` should inspect the hierarchy of - * loaders, and look into each of them for this method, by reflection. Then they should - * call it (still by reflection), and look for an agreed in advance target in it. If it is found, - * then the corresponding `ClassLoader` is the one with isolated dependencies. - */ - def getIsolationTargets: Array[String] = isolationTargets +class IsolatedClassLoader( + urls: Array[URL], + parent: ClassLoader, + isolationTargets: Array[String] +) extends URLClassLoader(urls, parent) { - } + /** + * Applications wanting to access an isolated `ClassLoader` should inspect the hierarchy of + * loaders, and look into each of them for this method, by reflection. Then they should + * call it (still by reflection), and look for an agreed in advance target in it. If it is found, + * then the corresponding `ClassLoader` is the one with isolated dependencies. + */ + def getIsolationTargets: Array[String] = isolationTargets } @@ -113,7 +113,7 @@ case class Launch( Console.err.println(s" $f") } - val isolatedLoader = new Launch.IsolatedClassLoader( + val isolatedLoader = new IsolatedClassLoader( isolatedFiles.map(_.toURI.toURL).toArray, parent, Array(target)