From: Teryk Bellahsene Date: Thu, 12 Oct 2017 09:53:18 +0000 (+0200) Subject: Fix quality flaws X-Git-Tag: 6.7-RC1~279 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=61c8a63a9cd8a04c2bc9fd228d12e7d6544ded13;p=sonarqube.git Fix quality flaws --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java index bc630d529a3..ff3f85f29fe 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java @@ -159,7 +159,7 @@ public class NewIssuesNotification extends Notification { int i = 1; for (Map.Entry 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++; } } diff --git a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/ProjectWsRef.java b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/ProjectWsRef.java index a93c8bb5e87..02bcb3d3025 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/permission/ws/ProjectWsRef.java +++ b/server/sonar-server/src/main/java/org/sonar/server/permission/ws/ProjectWsRef.java @@ -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 newOptionalWsProjectRef(@Nullable String uuid, @Nullable String key) {