diff options
author | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2013-02-01 09:28:33 +0100 |
---|---|---|
committer | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2013-02-01 09:28:33 +0100 |
commit | a0062f6aca571bcc72f5ffe02811254e5740706d (patch) | |
tree | 4b8a8b893589221d74d1e20040d992b84accb8d9 /plugins | |
parent | 3cb5d59379d5b052e256e6a34547562b5cd9678f (diff) | |
download | sonarqube-a0062f6aca571bcc72f5ffe02811254e5740706d.tar.gz sonarqube-a0062f6aca571bcc72f5ffe02811254e5740706d.zip |
Fix violations.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/templates/reviews/ReviewEmailTemplate.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/templates/reviews/ReviewEmailTemplate.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/templates/reviews/ReviewEmailTemplate.java index 2a2e4df3bc1..da82ccf69b7 100644 --- a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/templates/reviews/ReviewEmailTemplate.java +++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/templates/reviews/ReviewEmailTemplate.java @@ -91,12 +91,15 @@ public class ReviewEmailTemplate extends EmailTemplate { String newComment = notification.getFieldValue("new.comment"); String oldComment = notification.getFieldValue("old.comment"); - if (newComment != null) { // comment was added or modified + if (newComment != null) { + // comment was added or modified sb.append("Comment:\n ").append(newComment).append('\n'); - if (oldComment != null) { // comment was modified + if (oldComment != null) { + // comment was modified sb.append("Was:\n ").append(oldComment).append('\n'); } - } else if (oldComment != null) { // comment was deleted + } else if (oldComment != null) { + // comment was deleted sb.append("Comment deleted, was:\n ").append(oldComment).append('\n'); } } @@ -115,7 +118,8 @@ public class ReviewEmailTemplate extends EmailTemplate { return null; } User user = userFinder.findByLogin(login); - if (user == null) { // most probably user was deleted + if (user == null) { + // most probably user was deleted return login; } return StringUtils.defaultIfBlank(user.getName(), login); |