aboutsummaryrefslogtreecommitdiffstats
path: root/common-app-api
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2020-09-15 08:20:39 +0100
committerAnderson Ribeiro <anderson.ribeiro@est.tech>2020-09-29 06:33:44 +0000
commit0fa53516c409ac136f654475c1e41c77cad9cf09 (patch)
treeed7fc3e956fe8a1a12a0726fa81c673f4eb72951 /common-app-api
parentf2d671f77248730e10d925ae5f8c02abc09de6e1 (diff)
Allow hot reloading of specific config properties
getGlobalCsarImports and getDefaultImports entries are now not static which will allow to get new values if the config file change during runtime. Issue-ID: SDC-3303 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I870c13aec5d386aa3c87d6a335b5fb5948073954
Diffstat (limited to 'common-app-api')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
index 2841dfd123..4ec7a16a5c 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java
@@ -23,10 +23,12 @@ package org.openecomp.sdc.be.config;
import static java.lang.String.format;
import static java.util.Collections.emptyMap;
+import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.map.CaseInsensitiveMap;
import org.openecomp.sdc.common.api.BasicConfiguration;
@@ -1598,6 +1600,9 @@ public class Configuration extends BasicConfiguration {
}
public List<String> getGlobalCsarImports() {
+ if (CollectionUtils.isEmpty(globalCsarImports)) {
+ return Collections.emptyList();
+ }
return globalCsarImports;
}