From: Simon Brandhof Date: Mon, 1 Dec 2014 09:33:54 +0000 (+0100) Subject: Cosmetic refactoring of org.sonar.server.source.index X-Git-Tag: 5.0-RC1~141 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7906c3fb8d3d3e0c2485e325e46f898aee10a282;p=sonarqube.git Cosmetic refactoring of org.sonar.server.source.index --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineDoc.java b/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineDoc.java index a1147697f4e..5fd358dfda4 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineDoc.java +++ b/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineDoc.java @@ -90,8 +90,8 @@ public class SourceLineDoc extends BaseDoc { return getField(SourceLineIndexDefinition.FIELD_HIGHLIGHTING); } - public void setHighlighting(String fileUuid) { - setField(SourceLineIndexDefinition.FIELD_HIGHLIGHTING, fileUuid); + public void setHighlighting(String s) { + setField(SourceLineIndexDefinition.FIELD_HIGHLIGHTING, s); } public String source() { diff --git a/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexer.java b/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexer.java index 4ed8d7abe80..12213981ee6 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexer.java +++ b/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexer.java @@ -58,8 +58,7 @@ public class SourceLineIndexer extends BaseIndexer { } } - @VisibleForTesting - long index(Iterator sourceFiles) { + public long index(Iterator sourceFiles) { final BulkIndexer bulk = new BulkIndexer(esClient, SourceLineIndexDefinition.INDEX); return doIndex(bulk, sourceFiles); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineResultSetIterator.java b/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineResultSetIterator.java index 718a4f96bc5..a3875fc69c5 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineResultSetIterator.java +++ b/server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineResultSetIterator.java @@ -45,31 +45,31 @@ import java.util.List; * Scroll over table FILE_SOURCES and directly parse CSV field required to * populate the index sourcelines */ -class SourceLineResultSetIterator extends ResultSetIterator { +public class SourceLineResultSetIterator extends ResultSetIterator { - static class SourceFile { + public static class SourceFile { private final String fileUuid; private final long updatedAt; private final List lines = Lists.newArrayList(); - SourceFile(String fileUuid, long updatedAt) { + public SourceFile(String fileUuid, long updatedAt) { this.fileUuid = fileUuid; this.updatedAt = updatedAt; } - String getFileUuid() { + public String getFileUuid() { return fileUuid; } - long getUpdatedAt() { + public long getUpdatedAt() { return updatedAt; } - List getLines() { + public List getLines() { return lines; } - void addLine(SourceLineDoc line) { + public void addLine(SourceLineDoc line) { this.lines.add(line); } }