aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-dao/src
diff options
context:
space:
mode:
authorAurelien Poscia <aurelien.poscia@sonarsource.com>2022-05-05 16:28:32 +0200
committersonartech <sonartech@sonarsource.com>2022-05-09 20:02:59 +0000
commit7c886613a7fe113c15cd09d4341579eb9c072feb (patch)
tree47081b586c101f0ddefc7a838f789a2063e98b72 /server/sonar-db-dao/src
parent9f54cb9455149e9991e8ae780cf9a02cbeaf550b (diff)
downloadsonarqube-7c886613a7fe113c15cd09d4341579eb9c072feb.tar.gz
sonarqube-7c886613a7fe113c15cd09d4341579eb9c072feb.zip
SONAR-16361 adapt rule indexing to index multiple section description
Diffstat (limited to 'server/sonar-db-dao/src')
-rw-r--r--server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleForIndexingDto.java12
1 files changed, 0 insertions, 12 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleForIndexingDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleForIndexingDto.java
index cdc6b8d7844..e7d7aa4e43b 100644
--- a/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleForIndexingDto.java
+++ b/server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleForIndexingDto.java
@@ -23,15 +23,12 @@ import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Sets;
import java.util.Collections;
import java.util.HashSet;
-import java.util.Optional;
import java.util.Set;
import javax.annotation.CheckForNull;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.RuleStatus;
import org.sonar.api.rules.RuleType;
-import static org.sonar.db.rule.RuleDescriptionSectionDto.DEFAULT_KEY;
-
public class RuleForIndexingDto {
private String uuid;
@@ -196,15 +193,6 @@ public class RuleForIndexingDto {
this.ruleDescriptionSectionsDtos = ruleDescriptionSectionsDtos;
}
- private Optional<RuleDescriptionSectionDto> findExistingSectionWithSameKey(String ruleDescriptionSectionKey) {
- return ruleDescriptionSectionsDtos.stream().filter(section -> section.getKey().equals(ruleDescriptionSectionKey)).findAny();
- }
-
- @CheckForNull
- public RuleDescriptionSectionDto getDefaultRuleDescriptionSectionDto() {
- return findExistingSectionWithSameKey(DEFAULT_KEY).orElse(null);
- }
-
public void setTemplateRuleKey(String templateRuleKey) {
this.templateRuleKey = templateRuleKey;
}