aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch-protocol/src/main/java
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-04-01 21:15:43 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-04-01 21:15:43 +0200
commitf36b58a428f92f6bade77b735e597b595bbe43a8 (patch)
tree10a43079a563acaf56e493ad3ffb1101634cbd2e /sonar-batch-protocol/src/main/java
parent313cd197e2c8594b333c9ff65df34f0d4d211246 (diff)
downloadsonarqube-f36b58a428f92f6bade77b735e597b595bbe43a8.tar.gz
sonarqube-f36b58a428f92f6bade77b735e597b595bbe43a8.zip
SONAR-6319 Another perf improvement
Diffstat (limited to 'sonar-batch-protocol/src/main/java')
-rw-r--r--sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java5
1 files changed, 5 insertions, 0 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 3d292b68e19..ba90c68b4c8 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
@@ -112,6 +112,11 @@ public class BatchReportReader {
return Collections.emptyList();
}
+ public boolean hasSyntaxHighlighting(int componentRef) {
+ File file = fileStructure.fileFor(FileStructure.Domain.SYNTAX_HIGHLIGHTING, componentRef);
+ return file.exists();
+ }
+
public List<BatchReport.SyntaxHighlighting.HighlightingRule> readComponentSyntaxHighlighting(int componentRef) {
File file = fileStructure.fileFor(FileStructure.Domain.SYNTAX_HIGHLIGHTING, componentRef);
if (file.exists() && file.isFile()) {