提交 11bcb9f5 编写于 作者: K kohsuke

Fixed a bug where non-existent optional dependencies can result in a cascading load failure.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36213 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f00efb4b
......@@ -157,6 +157,11 @@ public abstract class ExtensionFinder implements ExtensionPoint {
if(instance!=null)
result.add(new ExtensionComponent<T>(type.cast(instance),item.annotation()));
}
} catch (LinkageError e) {
// sometimes the instantiation fails in an indirect classloading failure,
// which results in a LinkageError
LOGGER.log(item.annotation().optional() ? Level.FINE : Level.WARNING,
"Failed to load "+item.className(), e);
} catch (InstantiationException e) {
LOGGER.log(item.annotation().optional() ? Level.FINE : Level.WARNING,
"Failed to load "+item.className(), e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册