diff options
author | Léo Geoffroy <leo.geoffroy@sonarsource.com> | 2023-08-02 11:31:28 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-08-18 20:02:47 +0000 |
commit | 5f96642125af3af740f79d19e299ca79dbd89545 (patch) | |
tree | afa11af73470ab5fc8bcb7e644399c0d963c37de /server/sonar-db-dao/src/main/java/org/sonar/db/issue | |
parent | ec36845bbb03ae52ff98f6a2da2eca346336acd5 (diff) | |
download | sonarqube-5f96642125af3af740f79d19e299ca79dbd89545.tar.gz sonarqube-5f96642125af3af740f79d19e299ca79dbd89545.zip |
SONAR-20021 Add clean code attribute to RuleDto and IssueDto
Diffstat (limited to 'server/sonar-db-dao/src/main/java/org/sonar/db/issue')
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java index 06334fd6de6..0cd237eaedb 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java @@ -34,6 +34,7 @@ import javax.annotation.Nullable; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import org.sonar.api.rule.RuleKey; +import org.sonar.api.rules.CleanCodeAttribute; import org.sonar.api.rules.RuleType; import org.sonar.api.utils.Duration; import org.sonar.core.issue.DefaultIssue; @@ -53,6 +54,7 @@ public final class IssueDto implements Serializable { private static final Splitter STRING_LIST_SPLITTER = Splitter.on(STRING_LIST_SEPARATOR).trimResults().omitEmptyStrings(); private int type; + private CleanCodeAttribute cleanCodeAttribute; private String kee; private String componentUuid; private String projectUuid; @@ -492,6 +494,7 @@ public final class IssueDto implements Serializable { this.ruleRepo = rule.getRepositoryKey(); this.language = rule.getLanguage(); this.isExternal = rule.isExternal(); + this.cleanCodeAttribute = rule.getCleanCodeAttribute(); return this; } @@ -744,6 +747,15 @@ public final class IssueDto implements Serializable { return this; } + public CleanCodeAttribute getCleanCodeAttribute() { + return cleanCodeAttribute; + } + + public IssueDto setCleanCodeAttribute(CleanCodeAttribute cleanCodeAttribute) { + this.cleanCodeAttribute = cleanCodeAttribute; + return this; + } + public Optional<String> getClosedChangeData() { return Optional.ofNullable(closedChangeData); } |