@ -60,6 +60,15 @@ public class PluginClassLoader extends URLClassLoader {
}
}
* /
* /
// if the class it's a part of the plugin engine use parent class loader
if ( className . startsWith ( PLUGIN_PACKAGE_PREFIX ) ) {
try {
return PluginClassLoader . class . getClassLoader ( ) . loadClass ( className ) ;
} catch ( ClassNotFoundException e ) {
// try next step
}
}
// second check whether it's already been loaded
// second check whether it's already been loaded
Class < ? > loadedClass = findLoadedClass ( className ) ;
Class < ? > loadedClass = findLoadedClass ( className ) ;
if ( loadedClass ! = null ) {
if ( loadedClass ! = null ) {
@ -73,15 +82,6 @@ public class PluginClassLoader extends URLClassLoader {
// try next step
// try next step
}
}
// if the class it's a part of the plugin engine use parent class loader
if ( className . startsWith ( PLUGIN_PACKAGE_PREFIX ) ) {
try {
return PluginClassLoader . class . getClassLoader ( ) . loadClass ( className ) ;
} catch ( ClassNotFoundException e ) {
// try next step
}
}
// look in dependencies
// look in dependencies
List < PluginDependency > dependencies = pluginDescriptor . getDependencies ( ) ;
List < PluginDependency > dependencies = pluginDescriptor . getDependencies ( ) ;
for ( PluginDependency dependency : dependencies ) {
for ( PluginDependency dependency : dependencies ) {