]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 1 Jul 2014 14:34:54 +0000 (16:34 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 1 Jul 2014 15:46:04 +0000 (17:46 +0200)
sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileRepositoryExporter.java
sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/BulkRuleActivationActions.java
sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/RuleActivationActions.java

index ac29bc80f02b74fb0f8ad8003c40811d5b93e5d6..883d05675c7a9e740e968db7025f2b842ceeb7b6 100644 (file)
@@ -87,7 +87,7 @@ public class QProfileRepositoryExporter implements ServerComponent {
         paramsByActiveRule.put(activeRuleDto.getId(), activeRuleParamDto);
       }
     }
-    // TODO ruleRegistry.bulkIndexActiveRules(activeRuleDtos, paramsByActiveRule);
+    // TODO use RuleActivator to benefit from changelog and preview cache cleanup
   }
 
   private void processValidationMessages(ValidationMessages messages, QProfileResult result) {
index 2a9fe39a012dcea622097059d1117a50ec7a0203..89a5959e64851db25927333c47f99f1a562c6cf3 100644 (file)
@@ -101,7 +101,7 @@ public class BulkRuleActivationActions implements ServerComponent {
       .setExampleValue("java:MyProfile");
   }
 
-  private void bulkActivate(Request request, Response response) throws Exception {
+  private void bulkActivate(Request request, Response response) {
     BulkChangeResult result = profileService.bulkActivate(
       SearchAction.createRuleQuery(ruleService.newRuleQuery(), request),
       request.mandatoryParam(PROFILE_KEY),
@@ -109,7 +109,7 @@ public class BulkRuleActivationActions implements ServerComponent {
     writeResponse(result, response);
   }
 
-  private void bulkDeactivate(Request request, Response response) throws Exception {
+  private void bulkDeactivate(Request request, Response response) {
     BulkChangeResult result = profileService.bulkDeactivate(
       SearchAction.createRuleQuery(ruleService.newRuleQuery(), request),
       request.mandatoryParam(PROFILE_KEY));
index efa0e1bca12a17367d1c5aa2c8e85e62b2785318..f5488b2020614faff3ef2fff155f41d8ec47ae85 100644 (file)
@@ -109,7 +109,7 @@ public class RuleActivationActions implements ServerComponent {
       .setExampleValue("squid:AvoidCycles");
   }
 
-  private void activate(Request request, Response response) throws Exception {
+  private void activate(Request request, Response response) {
     RuleKey ruleKey = readRuleKey(request);
     RuleActivation activation = new RuleActivation(ruleKey);
     activation.setSeverity(request.param(SEVERITY));
@@ -121,7 +121,7 @@ public class RuleActivationActions implements ServerComponent {
     service.activate(request.mandatoryParam(PROFILE_KEY), activation);
   }
 
-  private void deactivate(Request request, Response response) throws Exception {
+  private void deactivate(Request request, Response response) {
     RuleKey ruleKey = readRuleKey(request);
     service.deactivate(ActiveRuleKey.of(request.mandatoryParam(PROFILE_KEY), ruleKey));
   }