aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java3
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectSettings.java11
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java7
3 files changed, 3 insertions, 18 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
index a637b45659c..ba1b76484de 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
@@ -74,7 +74,8 @@ public class BatchSettings extends Settings {
String moduleKey = jsonProperty.get("p");
if (moduleKey == null || projectKey.equals(moduleKey)) {
setProperty(key, value);
- } else {
+ }
+ if (moduleKey != null) {
Map<String, String> map = moduleProperties.get(moduleKey);
if (map == null) {
map = Maps.newHashMap();
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectSettings.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectSettings.java
index 871a3a5fde1..eb5da0ff65f 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectSettings.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectSettings.java
@@ -44,16 +44,7 @@ public class ProjectSettings extends Settings {
LoggerFactory.getLogger(ProjectSettings.class).info("Load module settings");
this.deprecatedCommonsConf = deprecatedCommonsConf;
- if (project.getParent() == null) {
- // root project -> no need to reload settings
- copy(batchSettings);
- } else {
- init(project, batchSettings);
- }
- }
-
- private void copy(BatchSettings batchSettings) {
- setProperties(batchSettings);
+ init(project, batchSettings);
}
private ProjectSettings init(ProjectDefinition project, BatchSettings batchSettings) {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
index a3a087b4175..c3c6f46fc9e 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
@@ -356,13 +356,6 @@ public class Settings implements BatchComponent, ServerComponent {
return addProperties(props);
}
- public final Settings setProperties(Settings s) {
- if (s.properties == null) {
- return clear();
- }
- return setProperties(Maps.newHashMap(s.properties));
- }
-
public final Settings setProperty(String key, @Nullable Date date, boolean includeTime) {
return setProperty(key, includeTime ? DateUtils.formatDateTime(date) : DateUtils.formatDate(date));
}