aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-01 13:43:04 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-07-01 13:51:23 +0200
commitef3e590d1ba5372d825216f85816463fa8e50a99 (patch)
treed43b93223e5440c3f4d8582eae406ff9863cc8a5 /plugins
parentcbe3819ae9e045049816761ff598ae5e74eac2e2 (diff)
downloadsonarqube-ef3e590d1ba5372d825216f85816463fa8e50a99.tar.gz
sonarqube-ef3e590d1ba5372d825216f85816463fa8e50a99.zip
Fix some quality flaws
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java
index b6d547d6d4c..d8e94277b2a 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java
@@ -64,10 +64,10 @@ public class NewIssuesEmailTemplate extends EmailTemplate {
sb.append("Project: ").append(projectName).append("\n\n");
sb.append(notification.getFieldValue("count")).append(" new issues").append("\n\n");
sb.append(" ");
- for (Iterator<String> severityIterator = Lists.reverse(Severity.ALL).iterator(); severityIterator.hasNext(); ) {
+ for (Iterator<String> severityIterator = Lists.reverse(Severity.ALL).iterator(); severityIterator.hasNext();) {
String severity = severityIterator.next();
- String severityLabel = i18n.message(getLocale(), "severity."+ severity, severity);
- sb.append(severityLabel).append(": ").append(notification.getFieldValue("count-"+ severity));
+ String severityLabel = i18n.message(getLocale(), "severity." + severity, severity);
+ sb.append(severityLabel).append(": ").append(notification.getFieldValue("count-" + severity));
if (severityIterator.hasNext()) {
sb.append(" ");
}
@@ -76,12 +76,10 @@ public class NewIssuesEmailTemplate extends EmailTemplate {
appendFooter(sb, notification);
- EmailMessage message = new EmailMessage()
+ return new EmailMessage()
.setMessageId("new-issues/" + notification.getFieldValue(FIELD_PROJECT_KEY))
.setSubject(projectName + ": new issues")
.setMessage(sb.toString());
-
- return message;
}
private void appendFooter(StringBuilder sb, Notification notification) {