mirror of https://github.com/sbt/sbt.git
The docs for ClassLoader, https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html say that all non-hierarchical custom classloaders should be registered as parallel capable. The docs also suggest that custom classloaders should try to only override findClass so I reworked LayerdClassLoader to only override findClass. I also added locking to the class loading to make it safe for concurrent loading. All of the custom classloaders besides LayeredClassLoader either subclass URLClassLoader or LayeredClassLoader but don't override loadClass. Because those two classloaders are parallel capable, the subclasses should be as well. It isn't possible to make classloaders that are implemented in scala parallel capable because scala 2 doesn't support jvm static blocks (dotty does support this with an annotation). To work around this, I re-worked some of the classloaders so that they are either directly implemented in java or I subclassed a scala implementation class in java. |
||
|---|---|---|
| .. | ||
| src | ||