diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-11-10 17:44:56 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-11-12 11:01:30 +0100 |
commit | dd16b88717a81272e50624bd60ece463fae8ec76 (patch) | |
tree | 1c175d39a49d588be5bd4eec3e75f458314747c9 /sonar-batch-protocol/src/main | |
parent | cefeabcce2dc82c4987e2337df8075647a70f3e6 (diff) | |
download | sonarqube-dd16b88717a81272e50624bd60ece463fae8ec76.tar.gz sonarqube-dd16b88717a81272e50624bd60ece463fae8ec76.zip |
SONAR-6993 Rename DuplicationBlock into CpdTextBlock
Diffstat (limited to 'sonar-batch-protocol/src/main')
4 files changed, 8 insertions, 8 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java index 786fcaaa9fb..89af7f43e74 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java @@ -91,10 +91,10 @@ public class BatchReportReader { return emptyCloseableIterator(); } - public CloseableIterator<BatchReport.DuplicationBlock> readComponentDuplicationBlocks(int componentRef) { - File file = fileStructure.fileFor(FileStructure.Domain.DUPLICATION_BLOCKS, componentRef); + public CloseableIterator<BatchReport.CpdTextBlock> readCpdTextBlocks(int componentRef) { + File file = fileStructure.fileFor(FileStructure.Domain.CPD_TEXT_BLOCKS, componentRef); if (fileExists(file)) { - return Protobuf.readStream(file, BatchReport.DuplicationBlock.parser()); + return Protobuf.readStream(file, BatchReport.CpdTextBlock.parser()); } return emptyCloseableIterator(); } diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportWriter.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportWriter.java index 224bfdd6935..7faabbb2d15 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportWriter.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportWriter.java @@ -98,9 +98,9 @@ public class BatchReportWriter { return file; } - public File writeDuplicationBlocks(int componentRef, Iterable<BatchReport.DuplicationBlock> duplicationBlocks) { - File file = fileStructure.fileFor(FileStructure.Domain.DUPLICATION_BLOCKS, componentRef); - Protobuf.writeStream(duplicationBlocks, file, false); + public File writeCpdTextBlocks(int componentRef, Iterable<BatchReport.CpdTextBlock> blocks) { + File file = fileStructure.fileFor(FileStructure.Domain.CPD_TEXT_BLOCKS, componentRef); + Protobuf.writeStream(blocks, file, false); return file; } diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/FileStructure.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/FileStructure.java index 23575dcdec6..9f4e8014e11 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/FileStructure.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/FileStructure.java @@ -31,7 +31,7 @@ public class FileStructure { COMPONENT("component-", Domain.PB), MEASURES("measures-", Domain.PB), DUPLICATIONS("duplications-", Domain.PB), - DUPLICATION_BLOCKS("duplication-blocks-", Domain.PB), + CPD_TEXT_BLOCKS("cpd-text-block-", Domain.PB), SYNTAX_HIGHLIGHTINGS("syntax-highlightings-", Domain.PB), CHANGESETS("changesets-", Domain.PB), SYMBOLS("symbols-", Domain.PB), diff --git a/sonar-batch-protocol/src/main/protobuf/batch_report.proto b/sonar-batch-protocol/src/main/protobuf/batch_report.proto index 7937353fe9f..ae012d0fc2d 100644 --- a/sonar-batch-protocol/src/main/protobuf/batch_report.proto +++ b/sonar-batch-protocol/src/main/protobuf/batch_report.proto @@ -143,7 +143,7 @@ message Duplication { } // Used for cross project duplication -message DuplicationBlock { +message CpdTextBlock { repeated int32 hash = 1 [packed = true]; optional int32 start_line = 2; optional int32 end_line = 3; |