diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-08-15 16:35:03 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-08-15 16:35:03 +0200 |
commit | fb059059ba3dd0dabc76a9ee3f63a3365769ed64 (patch) | |
tree | 918445eedf8b985af7bcc85c71fca90ee6250e9a | |
parent | cf9a51847405a117a66392c8543e38921cf372b0 (diff) | |
download | sonarqube-fb059059ba3dd0dabc76a9ee3f63a3365769ed64.tar.gz sonarqube-fb059059ba3dd0dabc76a9ee3f63a3365769ed64.zip |
SONAR-2646 When there isn't any violation in a project the hotspot widget 'Most violated rules' never finished to be displayed
-rw-r--r-- | plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java index 44d08372033..4c707e6f327 100644 --- a/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java +++ b/plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java @@ -91,7 +91,7 @@ public class MostViolatedRules extends AbstractHotspot { @Override protected void doOnResponse(Resource resource) { - if (resource.getMeasures().isEmpty()) { + if (resource==null || resource.getMeasures().isEmpty()) { renderEmptyResults(); } else { renderGrid(resource); @@ -133,9 +133,9 @@ public class MostViolatedRules extends AbstractHotspot { .setDepth(0) .setExcludeRules(false) .setLimit(LIMIT); - String priority = getSelectedPriority(); - if (priority!=null) { - query.setRulePriorities(priority); + String severity = getSelectedPriority(); + if (severity!=null) { + query.setRuleSeverities(severity); } return query; } |