summaryrefslogtreecommitdiffstats
path: root/dcae-analytics/dcae-analytics-web/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'dcae-analytics/dcae-analytics-web/src/main/java')
-rw-r--r--dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
index 31c01b0..c41e416 100644
--- a/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
+++ b/dcae-analytics/dcae-analytics-web/src/main/java/org/onap/dcae/analytics/web/spring/ConfigBindingServiceEnvironmentPostProcessor.java
@@ -223,9 +223,14 @@ public class ConfigBindingServiceEnvironmentPostProcessor implements Environment
*/
public String parseTcaConfig(JsonObject jsonObject) {
+ Optional<String> configServiceJsonOptional;
JsonElement jsonConfig = jsonObject.get(ConfigBindingServiceConstants.CONFIG);
- Optional<String> configServiceJsonOptional = Optional.of(jsonConfig.toString());
+ if (jsonConfig.getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG) != null) {
+ configServiceJsonOptional = Optional.of(jsonConfig.toString());
+ } else {
+ configServiceJsonOptional = Optional.of(jsonObject.toString());
+ }
// convert fetch config binding service json string to Map of property key and
// values