]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 24 Mar 2014 14:18:38 +0000 (15:18 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 24 Mar 2014 14:18:47 +0000 (15:18 +0100)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
sonar-batch/src/main/java/org/sonar/batch/qualitygate/GenerateQualityGateEvents.java

index 463c7cc3243459ca159ba9c023445d2f9d4c925a..373f1cdf932f438f6109c9eb80bb65df9988d807 100644 (file)
@@ -19,8 +19,6 @@
  */
 package org.sonar.plugins.core;
 
-import org.sonar.batch.qualitygate.GenerateQualityGateEvents;
-
 import com.google.common.collect.ImmutableList;
 import org.sonar.api.*;
 import org.sonar.api.checks.NoSonarFilter;
index 2d99ed9015f953b958f3fe58ff0350ec9f601962..b4b044dbc87d53bdb0fe67f91a0917e4edfdc80b 100644 (file)
@@ -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);
   }