Skip to content

Commit

Permalink
Merge pull request SonarQubeCommunity#6 from skunca/master
Browse files Browse the repository at this point in the history
Handle empty response when retrieving measures
  • Loading branch information
amuniz committed Jan 5, 2015
2 parents 5ec0fca + e1579e2 commit 96375d0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ private void addMeasures(final Measures measures,
query.setDepth(0);
query.setIncludeTrends(true);
Resource resource = sonar.find(query);
this.addAllMeasuresFromDocument(measures, resource);
if (resource != null) {
this.addAllMeasuresFromDocument(measures, resource);
} else {
LOG.debug("Empty response when looking for measures: " + measuresAsString.toString());
}
}

private void addAllMeasuresFromDocument(final Measures measures, final Resource resource) {
Expand Down

0 comments on commit 96375d0

Please sign in to comment.