aboutsummaryrefslogtreecommitdiffstats
path: root/common/onap-generic-artifact-browser
diff options
context:
space:
mode:
authormichal.banka <michal.banka@nokia.com>2019-07-16 13:51:00 +0200
committerTomasz Golabek <tomasz.golabek@nokia.com>2019-07-17 08:21:51 +0000
commit8a894e564dc7577d78273c890396ffb5dbe86bbb (patch)
treef351e0aaa9e4f6ca0bcaad80ab04c9084c905f55 /common/onap-generic-artifact-browser
parenta51eac038c8896b2413d0c57e223d49870fd1079 (diff)
Fix checkstyle violations in sdc-main/common
Change-Id: I3e132cf4bffd77f9910bf6eff2026c3267873b11 Issue-ID: SDC-2454 Signed-off-by: michal.banka <michal.banka@nokia.com>
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");
}