mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
SPIGOT-6749: Library Loader does not correctly isolate dependencies
This commit is contained in:
parent
6be36d3638
commit
9590b610cf
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…
Add table
Reference in a new issue