code: private void logMandatoryWarning(DiagnosticPosition pos, String msg,
                                       Object... args) {
          // Note: the following log methods are safe if lintCategory is null.
          if (enforceMandatory)
              log.mandatoryWarning(lintCategory, pos, msg, args);
          else
              log.warning(lintCategory, pos, msg, args);
      }
docs: Reports a mandatory warning to the log.  If mandatory warnings
  are not being enforced, treat this as an ordinary warning.