code: private void checkStringConstant(DiagnosticPosition pos, Object constValue) {
          if (nerrs != 0 || // only complain about a long string once
              constValue == null ||
              !(constValue instanceof String) ||
              ((String)constValue).length() < Pool.MAX_STRING_LENGTH)
              return;
          log.error(pos, "limit.string");
          nerrs++;
      }
docs: Check a constant value and report if it is a string that is
  too large.