Add test fix for library classes being visible to non-dependent plugins
This commit is contained in:
@@ -63,7 +63,13 @@ final class PluginClassloader extends URLClassLoader
|
||||
{
|
||||
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 ( checkOther || result.getClassLoader() == this )
|
||||
{
|
||||
return result;
|
||||
}
|
||||
} catch ( ClassNotFoundException ex )
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user