diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-11-08 11:59:17 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-11-08 11:59:17 +0100 |
commit | fd9aa0911fa1df89b0715d2f91827718d03dc466 (patch) | |
tree | 2f0eb0ee571786794316b793929af3b46c334138 /sonar-batch | |
parent | 7241569c473a5939044ab969f4bce976f19e70ec (diff) | |
download | sonarqube-fd9aa0911fa1df89b0715d2f91827718d03dc466.tar.gz sonarqube-fd9aa0911fa1df89b0715d2f91827718d03dc466.zip |
SONAR-3895 fix loading of deprecated commons-conf in root module
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java | 3 | ||||
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectSettings.java | 11 |
2 files changed, 3 insertions, 11 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) { |