APISonar


org.sonar.api.batch.scm.BlameLine.date

> org > sonar > api > batch > scm > BlameLine > date
org APIs sonar APIs api APIs batch APIs scm APIs BlameLine APIs date APIs

Example 1
private static void addChangeset(Builder scmBuilder, BlameLine line) {
    ScannerReport.Changesets.Changeset.Builder changesetBuilder = ScannerReport.Changesets.Changeset.newBuilder();
    changesetBuilder.setRevision(line.revision());
    changesetBuilder.setDate(line.date().getTime());
    if (StringUtils.isNotBlank(line.author())) {
      changesetBuilder.setAuthor(normalizeString(line.author()));
    }

    scmBuilder.addChangeset(changesetBuilder.build());
  }
Example 2
private static void validateLine(BlameLine line, int lineId, InputFile file) {
    Preconditions.checkArgument(StringUtils.isNotBlank(line.revision()), "Blame revision is blank for file %s at line %s", file, lineId);
    Preconditions.checkArgument(line.date() != null, "Blame date is null for file %s at line %s", file, lineId);
  }