]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaws
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Thu, 12 Oct 2017 09:53:18 +0000 (11:53 +0200)
committerTeryk Bellahsene <teryk@users.noreply.github.com>
Mon, 16 Oct 2017 07:27:14 +0000 (09:27 +0200)
server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/ProjectWsRef.java

index bc630d529a362af758e9596ff71bc392ca19bb45..ff3f85f29fee470badcc6a5b8bed68c4e8395355 100644 (file)
@@ -159,7 +159,7 @@ public class NewIssuesNotification extends Notification {
     int i = 1;
     for (Map.Entry<String, MetricStatsInt> tagStats : fiveBiggest(stats.getDistributedMetricStats(metric), MetricStatsInt::getOnLeak)) {
       setFieldValue(metric + DOT + i + COUNT, String.valueOf(tagStats.getValue().getOnLeak()));
-      setFieldValue(metric + DOT + i + ".label", tagStats.getKey());
+      setFieldValue(metric + DOT + i + LABEL, tagStats.getKey());
       i++;
     }
   }
index a93c8bb5e878f84f97f723a561ed95af80d93789..02bcb3d3025199f46325036c588c8c7512c270d8 100644 (file)
@@ -39,7 +39,7 @@ public class ProjectWsRef {
   private ProjectWsRef(@Nullable String uuid, @Nullable String key) {
     this.uuid = uuid;
     this.key = key;
-    checkRequest(this.uuid != null ^ this.key != null, "Project id or project key can be provided, not both.");
+    checkRequest(this.uuid != null ^ this.key != null, MSG_ID_OR_KEY_MUST_BE_PROVIDED);
   }
 
   public static Optional<ProjectWsRef> newOptionalWsProjectRef(@Nullable String uuid, @Nullable String key) {