diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-01-14 15:47:22 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-01-14 15:47:22 +0100 |
commit | ab91fbe48dce70e0f3ca2066e33b266c4814798f (patch) | |
tree | 5348b6c4d4c7f984991d4e7d9fe521f68f21bde4 | |
parent | b285f49c66c42284e63a6999ba355ce07ee98aad (diff) | |
download | sonarqube-ab91fbe48dce70e0f3ca2066e33b266c4814798f.tar.gz sonarqube-ab91fbe48dce70e0f3ca2066e33b266c4814798f.zip |
SONAR-4923 Remove no more used code
-rw-r--r-- | sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java | 5 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/new_rules_configuration_controller.rb | 27 |
2 files changed, 0 insertions, 32 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java b/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java index 76170dde702..43ec2bafcb3 100644 --- a/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java +++ b/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java @@ -342,11 +342,6 @@ public class QProfiles implements ServerComponent { } @CheckForNull - private QualityProfileDto findQualityProfile(String name, String language) { - return qualityProfileDao.selectByNameAndLanguage(name, language); - } - - @CheckForNull private QualityProfileDto findQualityProfile(int id) { return qualityProfileDao.selectById(id); } diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/new_rules_configuration_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/new_rules_configuration_controller.rb index 68732e919b8..d40707982e3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/new_rules_configuration_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/new_rules_configuration_controller.rb @@ -339,33 +339,6 @@ class NewRulesConfigurationController < ApplicationController private - # return the number of newly activated rules - def activate_rules(profile, rule_ids) - count=0 - rule_ids_to_activate=(rule_ids - profile.active_rules.map { |ar| ar.rule_id }) - unless rule_ids_to_activate.empty? - rules_to_activate=Rule.all(:conditions => ["status <> ? AND id IN (?)", Rule::STATUS_REMOVED, rule_ids_to_activate]) - count = rules_to_activate.size - rules_to_activate.each do |rule| - active_rule = profile.active_rules.create(:rule => rule, :failure_level => rule.priority) - java_facade.ruleActivated(profile.id, active_rule.id, current_user.name) - end - end - count - end - - def deactivate_rules(profile, rule_ids) - count=0 - profile.active_rules.each do |ar| - if rule_ids.include?(ar.rule_id) && !ar.inheritance.present? - java_facade.ruleDeactivated(profile.id, ar.id, current_user.name) - ar.destroy - count+=1 - end - end - count - end - def init_params @id = params[:id] @priorities = filter_any(params[:priorities]) || [''] |