aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-jacoco-plugin
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-10-03 11:41:25 +0200
committerDavid Gageot <david@gageot.net>2012-10-03 11:41:41 +0200
commit62ec1ada6f9c17f4e20fc1905a1c98d67461be78 (patch)
tree26ade5e6e87199c446a5f8a96edd2f7d4204834c /plugins/sonar-jacoco-plugin
parent50c384e2d3b0b3fa62e13e3f51f7a5a232465cf6 (diff)
downloadsonarqube-62ec1ada6f9c17f4e20fc1905a1c98d67461be78.tar.gz
sonarqube-62ec1ada6f9c17f4e20fc1905a1c98d67461be78.zip
SONAR-2804 fixes
Diffstat (limited to 'plugins/sonar-jacoco-plugin')
-rw-r--r--plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JaCoCoAllTestsSensor.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JaCoCoAllTestsSensor.java b/plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JaCoCoAllTestsSensor.java
index d37b7357380..4a9b53fdf8f 100644
--- a/plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JaCoCoAllTestsSensor.java
+++ b/plugins/sonar-jacoco-plugin/src/main/java/org/sonar/plugins/jacoco/JaCoCoAllTestsSensor.java
@@ -63,11 +63,9 @@ public class JaCoCoAllTestsSensor implements Sensor {
}
private void mergeReports(Project project) {
- File baseDir = project.getFileSystem().getBasedir();
-
- File reportUTs = new File(baseDir, configuration.getReportPath());
- File reportITs = new File(baseDir, configuration.getItReportPath());
- File reportAllTests = new File(baseDir, MERGED_EXEC);
+ File reportUTs = project.getFileSystem().resolvePath(configuration.getReportPath());
+ File reportITs = project.getFileSystem().resolvePath(configuration.getItReportPath());
+ File reportAllTests = project.getFileSystem().resolvePath(MERGED_EXEC);
SessionInfoStore infoStore = new SessionInfoStore();
ExecutionDataStore dataStore = new ExecutionDataStore();
@@ -97,7 +95,7 @@ public class JaCoCoAllTestsSensor implements Sensor {
reader.setSessionInfoVisitor(infoStore);
reader.setExecutionDataVisitor(dataStore);
reader.read();
- } catch (final IOException e) {
+ } catch (IOException e) {
throw new SonarException(String.format("Unable to read %s", file.getAbsolutePath()), e);
} finally {
Closeables.closeQuietly(resourceStream);