Merge branch '2.4.x'

Closes gh-25584
Fixes gh-25367 in 2.5.x
This commit is contained in:
Andy Wilkinson
2021-03-10 17:13:07 +00:00
3 changed files with 56 additions and 0 deletions

View File

@@ -173,6 +173,11 @@ public class RestartClassLoader extends URLClassLoader implements SmartClassLoad
return defineClass(name, b, 0, b.length, protectionDomain);
}
@Override
public ClassLoader getOriginalClassLoader() {
return getParent();
}
private URL createFileUrl(String name, ClassLoaderFile file) {
try {
return new URL("reloaded", null, -1, "/" + name, new ClassLoaderFileURLStreamHandler(file));