StreamScanner.java 文件源码

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

项目:woodstox 作者:
protected void _reportProblem(XMLReporter rep, XMLValidationProblem prob)
    throws XMLStreamException
{
    if (rep != null) {
        Location loc = prob.getLocation();
        if (loc == null) {
            loc = getLastCharLocation();
            prob.setLocation(loc);
        }
        // Backwards-compatibility fix: add non-null type, if missing:
        if (prob.getType() == null) {
            prob.setType(ErrorConsts.WT_VALIDATION);
        }
        // [WSTX-154]: was catching and dropping thrown exception: shouldn't.
        // [WTSX-157]: need to support XMLReporter2
        if (rep instanceof XMLReporter2) {
            ((XMLReporter2) rep).report(prob);
        } else {
            rep.report(prob.getMessage(), prob.getType(), prob, loc);
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号