aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch-protocol/src/main/java
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-04 11:46:12 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-04 11:46:12 +0100
commite2d3a2b2591bb2f43f13a42328cbf23f6c935e84 (patch)
tree8969e706d9165a7c7d949d79f19daae0b507787a /sonar-batch-protocol/src/main/java
parentbd22041edd9715212bc1c5a92eed393af80de95f (diff)
downloadsonarqube-e2d3a2b2591bb2f43f13a42328cbf23f6c935e84.tar.gz
sonarqube-e2d3a2b2591bb2f43f13a42328cbf23f6c935e84.zip
Fix quality flaws
Diffstat (limited to 'sonar-batch-protocol/src/main/java')
-rw-r--r--sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputReader.java12
-rw-r--r--sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputWriter.java8
2 files changed, 10 insertions, 10 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputReader.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputReader.java
index fe5799b19ba..28c50041c82 100644
--- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputReader.java
+++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputReader.java
@@ -33,28 +33,28 @@ public class BatchOutputReader {
this.fileStructure = new FileStructure(dir);
}
- public BatchOutput.ReportMetadata readMetadata() {
+ public BatchReport.Metadata readMetadata() {
File file = fileStructure.metadataFile();
if (!file.exists() || !file.isFile()) {
throw new IllegalStateException("Metadata file is missing in analysis report: " + file);
}
- return ProtobufUtil.readFile(file, BatchOutput.ReportMetadata.PARSER);
+ return ProtobufUtil.readFile(file, BatchReport.Metadata.PARSER);
}
@CheckForNull
- public BatchOutput.ReportComponent readComponent(int componentRef) {
+ public BatchReport.Component readComponent(int componentRef) {
File file = fileStructure.fileFor(FileStructure.Domain.COMPONENT, componentRef);
if (file.exists() && file.isFile()) {
- return ProtobufUtil.readFile(file, BatchOutput.ReportComponent.PARSER);
+ return ProtobufUtil.readFile(file, BatchReport.Component.PARSER);
}
return null;
}
- public Iterable<BatchOutput.ReportIssue> readComponentIssues(int componentRef) {
+ public Iterable<BatchReport.Issue> readComponentIssues(int componentRef) {
File file = fileStructure.fileFor(FileStructure.Domain.ISSUES, componentRef);
if (file.exists() && file.isFile()) {
// all the issues are loaded in memory
- BatchOutput.ReportIssues issues = ProtobufUtil.readFile(file, BatchOutput.ReportIssues.PARSER);
+ BatchReport.Issues issues = ProtobufUtil.readFile(file, BatchReport.Issues.PARSER);
return issues.getListList();
}
return Collections.emptyList();
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputWriter.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputWriter.java
index 746ff600109..2e12a297e1e 100644
--- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputWriter.java
+++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchOutputWriter.java
@@ -46,17 +46,17 @@ public class BatchOutputWriter {
/**
* Metadata is mandatory
*/
- public void writeMetadata(BatchOutput.ReportMetadata metadata) {
+ public void writeMetadata(BatchReport.Metadata metadata) {
ProtobufUtil.writeToFile(metadata, fileStructure.metadataFile());
}
- public void writeComponent(BatchOutput.ReportComponent component) {
+ public void writeComponent(BatchReport.Component component) {
File file = fileStructure.fileFor(FileStructure.Domain.COMPONENT, component.getRef());
ProtobufUtil.writeToFile(component, file);
}
- public void writeComponentIssues(int componentRef, Iterable<BatchOutput.ReportIssue> issues) {
- BatchOutput.ReportIssues.Builder issuesBuilder = BatchOutput.ReportIssues.newBuilder();
+ public void writeComponentIssues(int componentRef, Iterable<BatchReport.Issue> issues) {
+ BatchReport.Issues.Builder issuesBuilder = BatchReport.Issues.newBuilder();
issuesBuilder.setComponentRef(componentRef);
issuesBuilder.addAllList(issues);
File file = fileStructure.fileFor(FileStructure.Domain.ISSUES, componentRef);