From b7bcab77af7ec469674db1025d1fcfa0d2c3a66a Mon Sep 17 00:00:00 2001 From: lukasz-jarocki-sonarsource Date: Tue, 10 Oct 2023 16:48:38 +0200 Subject: [PATCH] NO-JIRA fix identation --- .../rule/registration/StartupRuleUpdater.java | 20 +++++++++---------- 1 file 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 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; } -- 2.39.5