From fb059059ba3dd0dabc76a9ee3f63a3365769ed64 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 15 Aug 2011 16:35:03 +0200 Subject: [PATCH] SONAR-2646 When there isn't any violation in a project the hotspot widget 'Most violated rules' never finished to be displayed --- .../core/hotspots/client/widget/MostViolatedRules.java | 8 ++++---- 1 file 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; } -- 2.39.5