summaryrefslogtreecommitdiffstats
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/GABServiceImpl.java7
-rw-r--r--common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABQuery.java2
-rw-r--r--common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABResultEntry.java1
-rw-r--r--common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/yaml/YamlParser.java4
4 files changed, 7 insertions, 7 deletions
diff --git a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/GABServiceImpl.java b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/GABServiceImpl.java
index 7f6c3539e2..0a8a206e0b 100644
--- a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/GABServiceImpl.java
+++ b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/GABServiceImpl.java
@@ -21,6 +21,7 @@
package org.onap.sdc.gab;
import java.io.IOException;
+
import org.onap.sdc.gab.model.GABQuery;
import org.onap.sdc.gab.model.GABQuery.GABQueryType;
import org.onap.sdc.gab.model.GABResults;
@@ -35,8 +36,8 @@ public class GABServiceImpl implements GABService {
}
}
- private GABYamlParser parse(GABQuery gabQuery, GABYamlParser gabYamlParser){
- return gabQuery.getType() == GABQueryType.PATH ?
- gabYamlParser.parseFile(gabQuery.getDocument()) : gabYamlParser.parseContent(gabQuery.getDocument());
+ private GABYamlParser parse(GABQuery gabQuery, GABYamlParser gabYamlParser) {
+ return gabQuery.getType() == GABQueryType.PATH
+ ? gabYamlParser.parseFile(gabQuery.getDocument()) : gabYamlParser.parseContent(gabQuery.getDocument());
}
}
diff --git a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABQuery.java b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABQuery.java
index f306e09665..cbe7ef31cf 100644
--- a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABQuery.java
+++ b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABQuery.java
@@ -35,7 +35,7 @@ public class GABQuery {
* PATH - when provided path to the yaml file
* CONTENT - when provided yaml file content
*/
- public enum GABQueryType{
+ public enum GABQueryType {
PATH, CONTENT
}
diff --git a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABResultEntry.java b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABResultEntry.java
index 45b2412c1e..cc6abd5170 100644
--- a/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABResultEntry.java
+++ b/common/onap-generic-artifact-browser/onap-generic-artifact-browser-service/src/main/java/org/onap/sdc/gab/model/GABResultEntry.java
@@ -23,7 +23,6 @@ package org.onap.sdc.gab.model;
import com.google.common.base.MoreObjects;
import lombok.AllArgsConstructor;
import lombok.Getter;
-import org.onap.sdc.gab.GABService;
/**
* See GABResultEntry.{@link #path}, GABResultEntry.{@link #data}
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 0d3575920c..ec4ff1319c 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
@@ -53,7 +53,7 @@ import org.yaml.snakeyaml.Yaml;
*/
public class YamlParser implements AutoCloseable {
- private static Logger LOGGER = Logger.getLogger(YamlParser.class.getName());
+ private static final Logger LOGGER = Logger.getLogger(YamlParser.class.getName());
private Stream<Object> parsedYamlContent;
private InputStream inputStream;
@@ -121,7 +121,7 @@ public class YamlParser implements AutoCloseable {
List<List<SimpleEntry<String, ? extends Collection<Object>>>> collect() throws IOException {
try {
return parsedYamlContent.map(containsKeys).filter(notEmptyListPredicate()).collect(Collectors.toList());
- } catch(Exception e){
+ } catch (Exception e) {
LOGGER.log(Level.WARNING, "Unexpected document content. Please check body of the yaml file.", e);
throw new IOException("Unexpected document content");
}