diff options
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java | 3 | ||||
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java | 6 |
2 files changed, 1 insertions, 8 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java index 5a4da59435b..3b7dffb95b6 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssue.java @@ -262,8 +262,7 @@ public class DefaultIssue implements Issue, Trackable, org.sonar.api.ce.measure. } public DefaultIssue setMessage(@Nullable String s) { - //TODO trim messageFormattings? - this.message = StringUtils.abbreviate(StringUtils.trim(s), MESSAGE_MAX_SIZE); + this.message = StringUtils.abbreviate(s, MESSAGE_MAX_SIZE); return this; } diff --git a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java index 9f16990058b..78ba1d218dd 100644 --- a/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java +++ b/sonar-core/src/test/java/org/sonar/core/issue/DefaultIssueTest.java @@ -148,12 +148,6 @@ public class DefaultIssueTest { } @Test - public void message_should_be_trimmed() { - issue.setMessage(" foo "); - assertThat(issue.message()).isEqualTo("foo"); - } - - @Test public void message_could_be_null() { issue.setMessage(null); assertThat(issue.message()).isNull(); |