diff options
author | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-07-31 13:52:16 +0200 |
---|---|---|
committer | Stephane Gamard <stephane.gamard@searchbox.com> | 2014-07-31 13:52:16 +0200 |
commit | a62ea5d4b00352588f883e15bbaaae6d64b60b59 (patch) | |
tree | b1b487136a9e67aef6a5b1217afd456ddbd13e87 /sonar-batch-protocol | |
parent | 9969f45f30ada6c30cc2045f8284b309418bae8e (diff) | |
parent | 86c81b2b63375bc87c52c4bebbefe62aa77a8bf7 (diff) | |
download | sonarqube-a62ea5d4b00352588f883e15bbaaae6d64b60b59.tar.gz sonarqube-a62ea5d4b00352588f883e15bbaaae6d64b60b59.zip |
Merge branch 'master' into SONAR-4898
Conflicts:
server/sonar-server/src/main/java/org/sonar/server/rule/index/RuleIndex.java
Diffstat (limited to 'sonar-batch-protocol')
3 files changed, 11 insertions, 3 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ActiveRule.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ActiveRule.java index 6c1992ac1e2..4fda09f8910 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ActiveRule.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ActiveRule.java @@ -20,6 +20,7 @@ package org.sonar.batch.protocol.input; import javax.annotation.CheckForNull; +import javax.annotation.Nullable; import java.util.HashMap; import java.util.Map; @@ -29,7 +30,7 @@ public class ActiveRule { private final String name, severity, internalKey, language; private final Map<String, String> params = new HashMap<String, String>(); - public ActiveRule(String repositoryKey, String ruleKey, String name, String severity, String internalKey, String language) { + public ActiveRule(String repositoryKey, String ruleKey, String name, String severity, @Nullable String internalKey, String language) { this.repositoryKey = repositoryKey; this.ruleKey = ruleKey; this.name = name; @@ -72,6 +73,7 @@ public class ActiveRule { return params; } + @CheckForNull public String internalKey() { return internalKey; } diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Metric.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Metric.java index f09f3b34e81..775acb52523 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Metric.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Metric.java @@ -49,7 +49,7 @@ public class Metric { public Metric(int id, String key, String valueType, - String description, + @Nullable String description, int direction, String name, boolean qualitative, @@ -82,6 +82,7 @@ public class Metric { return valueType; } + @CheckForNull public String description() { return description; } diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java index a386a0eeac7..570fb3630e5 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java @@ -43,7 +43,12 @@ public class ProjectReferentials { } public ProjectReferentials addSettings(String projectKey, Map<String, String> settings) { - settingsByModule.put(projectKey, settings); + Map<String, String> existingSettings = settingsByModule.get(projectKey); + if (existingSettings == null) { + existingSettings = new HashMap<String, String>(); + } + existingSettings.putAll(settings); + settingsByModule.put(projectKey, existingSettings); return this; } |