提交 fa2e85e7 编写于 作者: K kohsuke

don't treat the lack of display name as a fatal error, as most initialization...

don't treat the lack of display name as a fatal error, as most initialization tasks don't have any user-visibility anyway.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@26609 71c3de6d-444a-0410-be80-ed276b4c234a
上级 af7ffceb
......@@ -38,9 +38,13 @@ import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import hudson.model.Hudson;
import static java.util.logging.Level.WARNING;
/**
* Discovers initialization tasks from {@link Initializer}.
*
......@@ -83,7 +87,8 @@ public class InitializerFinder extends TaskBuilder {
if (key.length()==0) return c.getSimpleName()+"."+e.getName();
return rb.format(key);
} catch (ClassNotFoundException x) {
throw (Error)new NoClassDefFoundError(x.getMessage()+" for "+e.toString()).initCause(x);
LOGGER.log(WARNING, "Failed to load "+x.getMessage()+" for "+e.toString(),x);
return "";
}
}
......@@ -180,4 +185,6 @@ public class InitializerFinder extends TaskBuilder {
return r;
}
}
private static final Logger LOGGER = Logger.getLogger(InitializerFinder.class.getName());
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册