Skip to content

Commit

Permalink
Fix Null Pointer when cobertura path property is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
miklein committed Jan 15, 2015
1 parent f0830f0 commit 47847d6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public boolean shouldExecuteOnProject(Project project) {
}

public void analyse(Project project, SensorContext context) {
String path = settings.getString(COBERTURA_REPORTS_PATH_PROPERTY);
String path = settings.getString(COBERTURA_REPORTS_PATH_PROPERTY);
if (path == null){
LOG.warn("Cobertura report path property \"sonar.cobertura.reportPath\" not found!");
return;
}
File report = pathResolver.relativeFile(fileSystem.baseDir(), path);
if (!report.isFile()) {
LOG.warn("Cobertura report not found at {}", report);
Expand Down

0 comments on commit 47847d6

Please sign in to comment.