mirror of https://github.com/sbt/sbt.git
Improve toString for flat classloader
It can be helpful to see what jars are available to the underlying url classloader as well as what the parent classloader is.
This commit is contained in:
parent
b40084f6fd
commit
c9aec02d05
|
|
@ -198,7 +198,10 @@ private[sbt] object ClassLoaders {
|
|||
|
||||
// helper methods
|
||||
private def flatLoader(classpath: Seq[File], parent: ClassLoader): ClassLoader =
|
||||
new URLClassLoader(classpath.map(_.toURI.toURL).toArray, parent)
|
||||
new URLClassLoader(classpath.map(_.toURI.toURL).toArray, parent) {
|
||||
override def toString: String =
|
||||
s"FlatClassLoader(parent = $interfaceLoader, jars =\n${classpath.mkString("\n")}\n)"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue