mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
SPIGOT-6749: Library Loader does not correctly isolate dependencies
By: md_5 <git@md-5.net>
This commit is contained in:
parent
6882afca7b
commit
5814757cc7
1 changed files with 6 additions and 1 deletions
|
@ -101,7 +101,12 @@ final class PluginClassLoader extends URLClassLoader {
|
|||
|
||||
Class<?> loadClass0(@NotNull String name, boolean resolve, boolean checkGlobal, boolean checkLibraries) throws ClassNotFoundException {
|
||||
try {
|
||||
return super.loadClass(name, resolve);
|
||||
Class<?> result = super.loadClass(name, resolve);
|
||||
|
||||
// SPIGOT-6749: Library classes will appear in the above, but we don't want to return them to other plugins
|
||||
if (checkGlobal || result.getClassLoader() == this) {
|
||||
return result;
|
||||
}
|
||||
} catch (ClassNotFoundException ex) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue