From dff3e8bb4ed367c05fb0425f03386994ed27d10a Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 24 Mar 2020 17:13:24 -0400 Subject: Sonar and eclipse warnings common Unused imports Not enough arguments Issue-ID: POLICY-2204 Change-Id: I6405cb697ea976096b1276e2291b1c73617d33b5 Signed-off-by: Pamela Dragosh --- .../onap/policy/common/utils/coder/StandardValCoder.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'utils/src') 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; -- cgit 1.2.3-korg