code: public void warning(DiagnosticPosition pos, String key, Object ... args) {
          report(diags.warning(source, pos, key, args));
      }
docs: Report a warning, unless suppressed by the  -nowarn option or the
  maximum number of warnings has been reached.
  @param pos    The source position at which to report the warning.
  @param key    The key for the localized warning message.
  @param args   Fields of the warning message.