aboutsummaryrefslogtreecommitdiffstats
path: root/common/onap-generic-artifact-browser
diff options
context:
space:
mode:
Diffstat (limited to 'common/onap-generic-artifact-browser')
-rw-r--r--common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/yaml/YamlParser.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/yaml/YamlParser.java b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/yaml/YamlParser.java
index ec4ff1319c..2dbb8adfa3 100644
--- a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/yaml/YamlParser.java
+++ b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/yaml/YamlParser.java
@@ -58,6 +58,10 @@ public class YamlParser implements AutoCloseable {
private Stream<Object> parsedYamlContent;
private InputStream inputStream;
private Set<String> filters;
+ private Function<Object, List<SimpleEntry<String, ? extends Collection<Object>>>> containsKeys = parsedYamlSingleDocument -> {
+ JsonElement jsonElement = new Gson().toJsonTree(parsedYamlSingleDocument);
+ return findInJson(filters, jsonElement);
+ };
public YamlParser() {
this.parsedYamlContent = Stream.empty();
@@ -141,11 +145,6 @@ public class YamlParser implements AutoCloseable {
}
}
- private Function<Object, List<SimpleEntry<String, ? extends Collection<Object>>>> containsKeys = parsedYamlSingleDocument -> {
- JsonElement jsonElement = new Gson().toJsonTree(parsedYamlSingleDocument);
- return findInJson(filters, jsonElement);
- };
-
private List<SimpleEntry<String, ? extends Collection<Object>>> findInJson(Set<String> keys,
JsonElement document) {
return keys.stream()