aboutsummaryrefslogtreecommitdiffstats
path: root/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2020-06-17 09:58:36 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-06-17 13:02:53 +0000
commitbc9783d71b65e0ab70dcd5bd6fcb8ff0e09eaf4b (patch)
tree3ce41ea80207eb9d6dc80c8d8f6ba73c19272967 /common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src
parent0da2195ac1ba608661e74dab85a753df7c619fe2 (diff)
Fix Java Code Conventions non-compliance issues
Update locations of the constructor and private variable to comply with the Java Code Conventions. Issue-ID: SDC-3121 Signed-off-by: xuegao <xg353y@intl.att.com> Change-Id: I0114c880e389f0ed167262c9cd513583be35ba56 Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src')
-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()