From 0fa2a818b9614e4cd555a4816622e2f4ef45d16d Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 1 Jul 2014 16:34:54 +0200 Subject: [PATCH] Fix quality flaws --- .../server/qualityprofile/QProfileRepositoryExporter.java | 2 +- .../server/qualityprofile/ws/BulkRuleActivationActions.java | 4 ++-- .../sonar/server/qualityprofile/ws/RuleActivationActions.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileRepositoryExporter.java b/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileRepositoryExporter.java index ac29bc80f02..883d05675c7 100644 --- a/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileRepositoryExporter.java +++ b/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileRepositoryExporter.java @@ -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) { diff --git a/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/BulkRuleActivationActions.java b/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/BulkRuleActivationActions.java index 2a9fe39a012..89a5959e648 100644 --- a/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/BulkRuleActivationActions.java +++ b/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/BulkRuleActivationActions.java @@ -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)); diff --git a/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/RuleActivationActions.java b/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/RuleActivationActions.java index efa0e1bca12..f5488b20206 100644 --- a/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/RuleActivationActions.java +++ b/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/RuleActivationActions.java @@ -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)); } -- 2.39.5