c1021623e8
Use ClassLoader.getResource + openStream instead, to workaround an issue in URLClassLoader. Also set useCaches to false because kotlin-reflect only reads builtins metadata once per class loader, and doesn't need it to be cached. Using caches here might also lead to the problem of closed input streams when protobuf is read in parallel. The test doesn't check exactly this, though (it seems to succeed even if cached connections are used). Note that BuiltInsResourceLoader has a JDK 9+ specialization at libraries/reflect/api/src/java9, but that implementation does not need any changes because it uses Module.getResourceAsStream which is not affected by this issue in URLClassLoader. #KT-18277 Fixed