aboutsummaryrefslogtreecommitdiffstats
path: root/dcae-analytics-model
diff options
context:
space:
mode:
authorSingla, Rajiv (rs153v) <rs153v@att.com>2017-10-12 11:15:16 -0400
committerSingla, Rajiv (rs153v) <rs153v@att.com>2017-10-12 11:16:21 -0400
commit619add75ea412de8ef331d9ae898412818b203c6 (patch)
tree53c44fb41760e2ad4fa5ffc439e9fdd3360ce0ef /dcae-analytics-model
parent6b9782f9b6a4d062c9bc0dc387cad4bf3011e411 (diff)
TCA:Bug fix for JsonPath with non array values
Change-Id: I98bd9b78a5c7017ca98a0ce85f2ea30a2cb682df Signed-off-by: Singla, Rajiv (rs153v) <rs153v@att.com> Issue-Id: DCAEGEN2-153
Diffstat (limited to 'dcae-analytics-model')
-rw-r--r--dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java3
-rw-r--r--dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java
index ff98c3e..1a4feb3 100644
--- a/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java
+++ b/dcae-analytics-model/src/main/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplier.java
@@ -104,7 +104,8 @@ public class AnalyticsModelObjectMapperSupplier implements Supplier<ObjectMapper
public Set<Option> options() {
// Json Path exceptions are suppressed, also missing properties are tolerated
- return EnumSet.of(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS);
+ return EnumSet.of(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS,
+ Option.ALWAYS_RETURN_LIST);
}
});
diff --git a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java b/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java
index 628b7ea..55dd817 100644
--- a/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java
+++ b/dcae-analytics-model/src/test/java/org/openecomp/dcae/apod/analytics/model/util/json/AnalyticsModelObjectMapperSupplierTest.java
@@ -57,7 +57,8 @@ public class AnalyticsModelObjectMapperSupplierTest extends BaseAnalyticsModelUn
final Set<Option> configurationOptions = configuration.getOptions();
assertThat(configurationOptions,
- containsInAnyOrder(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS));
+ containsInAnyOrder(Option.DEFAULT_PATH_LEAF_TO_NULL, Option.SUPPRESS_EXCEPTIONS,
+ Option.ALWAYS_RETURN_LIST));
}
}