private void logMandatoryWarning(DiagnosticPosition pos, String msg,
                                     Object... args) {
        if (enforceMandatory)
            log.mandatoryWarning(pos, msg, args);
        else
            log.warning(pos, msg, args);
    }