aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-03-24 15:18:38 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-03-24 15:18:47 +0100
commit3dcf157ae394a4f777b81ec892c73bcb36fbf7a7 (patch)
tree94ac5efd8086cfc7eee014c049794481391995ac /sonar-batch/src
parent6c2b6ae4964679dbfd9a0f41db58605ad8bf38fa (diff)
downloadsonarqube-3dcf157ae394a4f777b81ec892c73bcb36fbf7a7.tar.gz
sonarqube-3dcf157ae394a4f777b81ec892c73bcb36fbf7a7.zip
Fix quality flaws
Diffstat (limited to 'sonar-batch/src')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/qualitygate/GenerateQualityGateEvents.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/qualitygate/GenerateQualityGateEvents.java b/sonar-batch/src/main/java/org/sonar/batch/qualitygate/GenerateQualityGateEvents.java
index 2d99ed9015f..b4b044dbc87 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/qualitygate/GenerateQualityGateEvents.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/qualitygate/GenerateQualityGateEvents.java
@@ -26,7 +26,6 @@ import org.sonar.api.measures.Metric;
import org.sonar.api.measures.Metric.Level;
import org.sonar.api.notifications.Notification;
import org.sonar.api.notifications.NotificationManager;
-import org.sonar.api.profiles.RulesProfile;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
import org.sonar.api.resources.ResourceUtils;
@@ -92,14 +91,14 @@ public class GenerateQualityGateEvents implements Decorator {
protected void notifyUsers(Resource resource, String alertName, String alertText, Level alertLevel, boolean isNewAlert) {
Notification notification = new Notification("alerts")
- .setDefaultMessage("Alert on " + resource.getLongName() + ": " + alertName)
- .setFieldValue("projectName", resource.getLongName())
- .setFieldValue("projectKey", resource.getKey())
- .setFieldValue("projectId", String.valueOf(resource.getId()))
- .setFieldValue("alertName", alertName)
- .setFieldValue("alertText", alertText)
- .setFieldValue("alertLevel", alertLevel.toString())
- .setFieldValue("isNewAlert", Boolean.toString(isNewAlert));
+ .setDefaultMessage("Alert on " + resource.getLongName() + ": " + alertName)
+ .setFieldValue("projectName", resource.getLongName())
+ .setFieldValue("projectKey", resource.getKey())
+ .setFieldValue("projectId", String.valueOf(resource.getId()))
+ .setFieldValue("alertName", alertName)
+ .setFieldValue("alertText", alertText)
+ .setFieldValue("alertLevel", alertLevel.toString())
+ .setFieldValue("isNewAlert", Boolean.toString(isNewAlert));
notificationManager.scheduleForSending(notification);
}