diff options
author | lukasz-jarocki-sonarsource <lukasz.jarocki@sonarsource.com> | 2023-10-10 16:48:38 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-10-11 20:02:34 +0000 |
commit | b7bcab77af7ec469674db1025d1fcfa0d2c3a66a (patch) | |
tree | 23ab3440b17f8ed51b6e370b538ddb57a292f739 | |
parent | 7d1ab6abe8fceb327eae9f942301b3d1b83a90aa (diff) | |
download | sonarqube-b7bcab77af7ec469674db1025d1fcfa0d2c3a66a.tar.gz sonarqube-b7bcab77af7ec469674db1025d1fcfa0d2c3a66a.zip |
NO-JIRA fix identation
-rw-r--r-- | server/sonar-webserver-core/src/main/java/org/sonar/server/rule/registration/StartupRuleUpdater.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/registration/StartupRuleUpdater.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/registration/StartupRuleUpdater.java index e9eedabd6c4..7542ed67460 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/registration/StartupRuleUpdater.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/registration/StartupRuleUpdater.java @@ -222,7 +222,6 @@ public class StartupRuleUpdater { .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } - private static boolean mergeEducationPrinciples(RulesDefinition.Rule ruleDef, RuleDto dto) { boolean changed = false; if (dto.getEducationPrinciples().size() != ruleDef.educationPrincipleKeys().size() || @@ -239,25 +238,24 @@ public class StartupRuleUpdater { if (RuleStatus.REMOVED == ruleDef.status()) { dto.setSystemTags(emptySet()); changed = true; - } else if (dto.getSystemTags().size() != ruleDef.tags().size() || - !dto.getSystemTags().containsAll(ruleDef.tags())) { - dto.setSystemTags(ruleDef.tags()); - changed = true; - } + } else if (dto.getSystemTags().size() != ruleDef.tags().size() || !dto.getSystemTags().containsAll(ruleDef.tags())) { + dto.setSystemTags(ruleDef.tags()); + changed = true; + } return changed; } private static boolean mergeSecurityStandards(RulesDefinition.Rule ruleDef, RuleDto dto) { boolean changed = false; + Set<String> securityStandards = dto.getSecurityStandards(); if (RuleStatus.REMOVED == ruleDef.status()) { dto.setSecurityStandards(emptySet()); changed = true; - } else if (dto.getSecurityStandards().size() != ruleDef.securityStandards().size() || - !dto.getSecurityStandards().containsAll(ruleDef.securityStandards())) { - dto.setSecurityStandards(ruleDef.securityStandards()); - changed = true; - } + } else if (securityStandards.size() != ruleDef.securityStandards().size() || !securityStandards.containsAll(ruleDef.securityStandards())) { + dto.setSecurityStandards(ruleDef.securityStandards()); + changed = true; + } return changed; } |