aboutsummaryrefslogtreecommitdiffstats
path: root/utils/src
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-03-24 17:13:24 -0400
committerPamela Dragosh <pdragosh@research.att.com>2020-03-24 17:37:17 -0400
commitdff3e8bb4ed367c05fb0425f03386994ed27d10a (patch)
treeeb4bf4cd8dfea8cd807ebf0d11ee01502e5b3805 /utils/src
parent5765debbba7d08c633870b55eb38127a2e07c5f9 (diff)
Sonar and eclipse warnings common
Unused imports Not enough arguments Issue-ID: POLICY-2204 Change-Id: I6405cb697ea976096b1276e2291b1c73617d33b5 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/main/java/org/onap/policy/common/utils/coder/StandardValCoder.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/coder/StandardValCoder.java b/utils/src/main/java/org/onap/policy/common/utils/coder/StandardValCoder.java
index 6e08e722..85505a98 100644
--- a/utils/src/main/java/org/onap/policy/common/utils/coder/StandardValCoder.java
+++ b/utils/src/main/java/org/onap/policy/common/utils/coder/StandardValCoder.java
@@ -1,4 +1,4 @@
-/*
+/*--
* ============LICENSE_START=======================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -36,8 +36,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Extension to the StandardCoder to support streaming validation
- * against a Draft-07 Json schema specification.
+ * Extension to the StandardCoder to support streaming validation against a Draft-07 Json schema specification.
*/
@ToString
@@ -56,16 +55,15 @@ public class StandardValCoder extends StandardCoder {
* StandardCoder with validation.
*/
public StandardValCoder(@NonNull String jsonSchema, @NonNull String name) {
- SchemaSource schemaSource =
- new StringSchemaSource(jsonSchema, JsonSchemaVersion.DRAFT07, null, name);
+ SchemaSource schemaSource = new StringSchemaSource(jsonSchema, JsonSchemaVersion.DRAFT07, null, name);
this.validator = validatorApi.loadSchema(schemaSource);
}
@Override
protected String toPrettyJson(Object object) {
/*
- * The validator strips off the "pretty" stuff (i.e., spaces), thus we have to validate
- * and generate the pretty JSON in separate steps.
+ * The validator strips off the "pretty" stuff (i.e., spaces), thus we have to validate and generate the pretty
+ * JSON in separate steps.
*/
getGSON().toJson(object, object.getClass(), validatorApi.createJsonWriter(validator, new StringWriter()));
@@ -102,7 +100,7 @@ public class StandardValCoder extends StandardCoder {
try {
conformance(json);
} catch (CoderException e) {
- logger.info("JSON is not conformant to schema {}", e);
+ logger.info("JSON is not conformant to schema", e);
return false;
}
return true;