diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2022-03-17 14:59:15 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-03-18 20:02:58 +0000 |
commit | 7aa77dfb2275f38de07c9d3b936e0eea43ac96af (patch) | |
tree | 0ff992bdb11f30f395243e86e1d3039847dd8231 /sonar-scanner-protocol | |
parent | eb34454afc19f4994ae587b43ff2d0c79978de23 (diff) | |
download | sonarqube-7aa77dfb2275f38de07c9d3b936e0eea43ac96af.tar.gz sonarqube-7aa77dfb2275f38de07c9d3b936e0eea43ac96af.zip |
SONAR-16097 Apply feedback
Diffstat (limited to 'sonar-scanner-protocol')
3 files changed, 4 insertions, 4 deletions
diff --git a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java index d5bcf2a3a4d..6c33311fc5e 100644 --- a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java +++ b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/FileStructure.java @@ -67,7 +67,7 @@ public class FileStructure { } public File analysisCache() { - return new File(dir, "plugin-cache.pb"); + return new File(dir, "analysis-cache.pb"); } public File analysisLog() { diff --git a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java index 5e1376a3f1c..006bdf66760 100644 --- a/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java +++ b/sonar-scanner-protocol/src/main/java/org/sonar/scanner/protocol/output/ScannerReportReader.java @@ -80,7 +80,7 @@ public class ScannerReportReader { } @CheckForNull - public InputStream getPluginCache() { + public InputStream getAnalysisCache() { File file = fileStructure.analysisCache(); if (fileExists(file)) { try { diff --git a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java index 1269c63c540..269bacef2d4 100644 --- a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java +++ b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java @@ -213,7 +213,7 @@ public class ScannerReportReaderTest { } @Test - public void read_plugin_cache() throws IOException { + public void read_analysis_cache() throws IOException { ScannerReportWriter writer = new ScannerReportWriter(dir); writer.writeAnalysisCache(ScannerInternal.AnalysisCacheMsg.newBuilder() .putMap("key", ByteString.copyFrom("data", UTF_8)) @@ -221,7 +221,7 @@ public class ScannerReportReaderTest { ScannerReportReader reader = new ScannerReportReader(dir); - AnalysisCacheMsg cache = Protobuf.read(new GZIPInputStream(reader.getPluginCache()), ScannerInternal.AnalysisCacheMsg.parser()); + AnalysisCacheMsg cache = Protobuf.read(new GZIPInputStream(reader.getAnalysisCache()), ScannerInternal.AnalysisCacheMsg.parser()); assertThat(cache.getMapMap()).containsOnly(new AbstractMap.SimpleEntry<>("key", ByteString.copyFrom("data", UTF_8))); } |