ValidatorPlugIn.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:sonar-scanner-maven 作者:
/**
 * Initialize and load our resources.
 *
 * @param servlet The ActionServlet for our application
 * @param config  The ModuleConfig for our owning module
 * @throws ServletException if we cannot configure ourselves correctly
 */
public void init(ActionServlet servlet, ModuleConfig config)
    throws ServletException {
    // Remember our associated configuration and servlet
    this.config = config;
    this.servlet = servlet;

    // Load our database from persistent storage
    try {
        this.initResources();

        servlet.getServletContext().setAttribute(VALIDATOR_KEY
            + config.getPrefix(), resources);

        servlet.getServletContext().setAttribute(STOP_ON_ERROR_KEY + '.'
            + config.getPrefix(),
            (this.stopOnFirstError ? Boolean.TRUE : Boolean.FALSE));
    } catch (Exception e) {
        log.error(e.getMessage(), e);
        throw new UnavailableException(
            "Cannot load a validator resource from '" + pathnames + "'");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号