// public ClassLoader run() {
// return Thread.currentThread().getContextClassLoader();
// }
//});
ClassLoader contextClassLoader = ServiceDiscovery.getInstance().getServiceDiscoverer().getClass().getClassLoader();
ContributionClassLoaderProvider provider = null;
try {
ContributionClassloaderProviderExtensionPoint providers =
registry.getExtensionPoint(ContributionClassloaderProviderExtensionPoint.class);
provider = providers.getProvider(contribution.getType());
} catch (Throwable e) {
// Ignore errors
}
if (provider == null) {
provider = new DefaultContributionClassLoaderProvider();
}
cl = provider.getClassLoader(contribution, contextClassLoader);
contribution.setClassLoader(cl);
}
this.classLoader = new WeakReference<ClassLoader>(cl);
} else {
// This path should be used only for unit testing.