diff options
author | Léo Geoffroy <leo.geoffroy@sonarsource.com> | 2024-02-16 16:55:14 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-02-16 20:02:31 +0000 |
commit | b50db984f07fdfce6a5c8c053d8a86394681463a (patch) | |
tree | 43d52100af022482708793c5698231f50740ae4d | |
parent | e5722fd2f6a41aabdc94c37cca1736ef00e6707f (diff) | |
download | sonarqube-b50db984f07fdfce6a5c8c053d8a86394681463a.tar.gz sonarqube-b50db984f07fdfce6a5c8c053d8a86394681463a.zip |
SONAR-21165 Fix code smells
2 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-webserver-common/src/main/java/org/sonar/server/common/rule/RuleCreator.java b/server/sonar-webserver-common/src/main/java/org/sonar/server/common/rule/RuleCreator.java index 90513cf5687..f64553b4ecb 100644 --- a/server/sonar-webserver-common/src/main/java/org/sonar/server/common/rule/RuleCreator.java +++ b/server/sonar-webserver-common/src/main/java/org/sonar/server/common/rule/RuleCreator.java @@ -230,7 +230,7 @@ public class RuleCreator { return ruleDto; } - private void setCleanCodeAttributeAndImpacts(NewCustomRule newRule, RuleDto ruleDto, RuleDto templateRuleDto) { + private static void setCleanCodeAttributeAndImpacts(NewCustomRule newRule, RuleDto ruleDto, RuleDto templateRuleDto) { RuleType ruleType = newRule.type(); int type = ruleType == null ? templateRuleDto.getType() : ruleType.getDbConstant(); String severity = ofNullable(newRule.severity()).orElse(Severity.MAJOR); 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 80c41708866..b86603b0cc2 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 @@ -161,7 +161,7 @@ public class StartupRuleUpdater { changed = true; } changed |= mergeCleanCodeAttribute(def, dto, ruleChange); - changed |= mergeImpacts(def, dto, uuidFactory, ruleChange); + changed |= mergeImpacts(def, dto, ruleChange); if (dto.isAdHoc()) { dto.setIsAdHoc(false); changed = true; @@ -188,7 +188,7 @@ public class StartupRuleUpdater { return changed; } - boolean mergeImpacts(RulesDefinition.Rule def, RuleDto dto, UuidFactory uuidFactory, RuleChange ruleChange) { + boolean mergeImpacts(RulesDefinition.Rule def, RuleDto dto, RuleChange ruleChange) { if (dto.getEnumType() == RuleType.SECURITY_HOTSPOT) { return false; } |