diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-06-11 16:43:17 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-06-15 10:03:49 +0200 |
commit | 4debaa56f37d368937217975f610d347528850a4 (patch) | |
tree | 55ffea02854ba52340ab71e1fe1d54ec247881b3 | |
parent | a58eab01247fc0aa6bd5f4938c0412fc0e110f76 (diff) | |
download | sonarqube-4debaa56f37d368937217975f610d347528850a4.tar.gz sonarqube-4debaa56f37d368937217975f610d347528850a4.zip |
rename field reportReader in SourceLinesCache
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/computation/issue/SourceLinesCache.java | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/SourceLinesCache.java b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/SourceLinesCache.java index d5e7a313e46..f8654fefeb8 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/issue/SourceLinesCache.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/issue/SourceLinesCache.java @@ -19,6 +19,12 @@ */ package org.sonar.server.computation.issue; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.CheckForNull; +import javax.annotation.Nullable; import org.apache.commons.lang.StringUtils; import org.sonar.batch.protocol.output.BatchReport; import org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset; @@ -27,13 +33,6 @@ import org.sonar.server.computation.batch.BatchReportReader; import org.sonar.server.source.index.SourceLineDoc; import org.sonar.server.source.index.SourceLineIndex; -import javax.annotation.CheckForNull; -import javax.annotation.Nullable; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - /** * Cache of the lines of the currently processed file. Only a <strong>single</strong> file * is kept in memory at a time. Data is loaded <strong>on demand</strong> (to avoid non necessary @@ -65,13 +64,13 @@ public class SourceLinesCache { /** * Marks the currently processed component */ - void init(String fileUuid, @Nullable Integer fileReportRef, BatchReportReader thisReportReader) { - loaded = false; - currentFileUuid = fileUuid; - currentFileReportRef = fileReportRef; - lastCommitDate = 0L; - lastCommitAuthor = null; - reportReader = thisReportReader; + void init(String fileUuid, @Nullable Integer fileReportRef, BatchReportReader reportReader) { + this.loaded = false; + this.currentFileUuid = fileUuid; + this.currentFileReportRef = fileReportRef; + this.lastCommitDate = 0L; + this.lastCommitAuthor = null; + this.reportReader = reportReader; clear(); } @@ -88,7 +87,7 @@ public class SourceLinesCache { } String author = null; if (lineNumber <= scm.getChangesetIndexByLineCount()) { - BatchReport.Changesets.Changeset changeset = scm.getChangeset(scm.getChangesetIndexByLine(lineNumber-1)); + BatchReport.Changesets.Changeset changeset = scm.getChangeset(scm.getChangesetIndexByLine(lineNumber - 1)); author = changeset.hasAuthor() ? changeset.getAuthor() : null; } |