mirror of https://github.com/sbt/sbt.git
Prevent compiler from inferring existential
This commit is contained in:
parent
a244509b67
commit
7caee99846
|
|
@ -243,14 +243,14 @@ object Cache {
|
||||||
Option(handlerClsCache.get(protocol)) match {
|
Option(handlerClsCache.get(protocol)) match {
|
||||||
case None =>
|
case None =>
|
||||||
val clsName = s"coursier.cache.protocol.${protocol.capitalize}Handler"
|
val clsName = s"coursier.cache.protocol.${protocol.capitalize}Handler"
|
||||||
def clsOpt(loader: ClassLoader) =
|
def clsOpt(loader: ClassLoader): Option[Class[_]] =
|
||||||
try Some(loader.loadClass(clsName))
|
try Some(loader.loadClass(clsName))
|
||||||
catch {
|
catch {
|
||||||
case _: ClassNotFoundException =>
|
case _: ClassNotFoundException =>
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
val clsOpt0 = clsOpt(Thread.currentThread().getContextClassLoader)
|
val clsOpt0: Option[Class[_]] = clsOpt(Thread.currentThread().getContextClassLoader)
|
||||||
.orElse(clsOpt(getClass.getClassLoader))
|
.orElse(clsOpt(getClass.getClassLoader))
|
||||||
|
|
||||||
def printError(e: Exception): Unit =
|
def printError(e: Exception): Unit =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue