aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-gwt
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-08-15 16:35:03 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-08-15 16:35:03 +0200
commitfb059059ba3dd0dabc76a9ee3f63a3365769ed64 (patch)
tree918445eedf8b985af7bcc85c71fca90ee6250e9a /plugins/sonar-core-gwt
parentcf9a51847405a117a66392c8543e38921cf372b0 (diff)
downloadsonarqube-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
Diffstat (limited to 'plugins/sonar-core-gwt')
-rw-r--r--plugins/sonar-core-gwt/src/main/java/org/sonar/plugins/core/hotspots/client/widget/MostViolatedRules.java8
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;
}