diff options
Diffstat (limited to 'common')
2 files changed, 4 insertions, 8 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() diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilter.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilter.java index ce0391d62d..dc868c938a 100644 --- a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilter.java +++ b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/CapabilityFilter.java @@ -41,7 +41,4 @@ public class CapabilityFilter { return "CapabilityFilter{" + "properties=" + properties + '}'; } - public CapabilityFilter() { - //default constructor - } } |