diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-04-03 09:01:28 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-04-07 17:21:33 +0200 |
commit | 9f602a66d461ceb3c2cde7c44a6b7fb6c9db0a78 (patch) | |
tree | 5b465a5bbc37a0d21d99dbaabfb419675745077f /sonar-batch-protocol | |
parent | b16c02760d933b45d519b2f5c1f4529aac574df5 (diff) | |
download | sonarqube-9f602a66d461ceb3c2cde7c44a6b7fb6c9db0a78.tar.gz sonarqube-9f602a66d461ceb3c2cde7c44a6b7fb6c9db0a78.zip |
Fix compilation issue after merge
Diffstat (limited to 'sonar-batch-protocol')
-rw-r--r-- | sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java index c109796fd35..184e1209804 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java @@ -196,8 +196,7 @@ public class BatchReportReaderTest { sut = new BatchReportReader(dir); - InputStream inputStream = FileUtils.openInputStream(new BatchReportReader(dir).readFileCoverage(1)); - try { + try (InputStream inputStream = FileUtils.openInputStream(new BatchReportReader(dir).readFileCoverage(1))) { BatchReport.Coverage coverage = BatchReport.Coverage.PARSER.parseDelimitedFrom(inputStream); assertThat(coverage.getLine()).isEqualTo(1); assertThat(coverage.getConditions()).isEqualTo(1); @@ -215,8 +214,6 @@ public class BatchReportReaderTest { assertThat(coverage.getUtCoveredConditions()).isEqualTo(4); assertThat(coverage.getItCoveredConditions()).isEqualTo(5); assertThat(coverage.getOverallCoveredConditions()).isEqualTo(5); - } finally { - inputStream.close(); } } |