From: Julien Lancelot Date: Thu, 6 Feb 2014 10:17:20 +0000 (+0100) Subject: Fix quality flaws X-Git-Tag: 4.2~223 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=12c14f0149b0ed09041e5c13fcf12d5cf31b61ea;p=sonarqube.git Fix quality flaws --- diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java index 10dba57cd7f..408ced20c9d 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java @@ -61,21 +61,15 @@ public class IssueChangeDtoTest { } @Test - public void create_from_diff_without_date() throws Exception { + public void to_comment() throws Exception { FieldDiffs diffs = new FieldDiffs(); diffs.setDiff("severity", "INFO", "BLOCKER"); diffs.setUserLogin("emmerik"); diffs.setCreationDate(null); - IssueChangeDto dto = IssueChangeDto.of("ABCDE", diffs); + DefaultIssueComment comment = IssueChangeDto.of("ABCDE", diffs).toComment(); + - assertThat(dto.getChangeData()).isEqualTo("severity=INFO|BLOCKER"); - assertThat(dto.getChangeType()).isEqualTo("diff"); - assertThat(dto.getCreatedAt()).isNotNull(); - assertThat(dto.getUpdatedAt()).isNotNull(); - assertThat(dto.getIssueChangeCreationDate()).isNull(); - assertThat(dto.getIssueKey()).isEqualTo("ABCDE"); - assertThat(dto.getUserLogin()).isEqualTo("emmerik"); } @Test diff --git a/sonar-server/src/main/java/org/sonar/server/rule/RuleDocumentParser.java b/sonar-server/src/main/java/org/sonar/server/rule/RuleDocumentParser.java index e9d9846ba47..a2c2d46c1a3 100644 --- a/sonar-server/src/main/java/org/sonar/server/rule/RuleDocumentParser.java +++ b/sonar-server/src/main/java/org/sonar/server/rule/RuleDocumentParser.java @@ -33,7 +33,7 @@ import static com.google.common.collect.Lists.newArrayList; public class RuleDocumentParser { - private void RuleDocumentParser() { + private RuleDocumentParser() { // Utility class }