diff options
author | Jim Hahn <jrh3@att.com> | 2019-06-14 19:20:55 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-06-17 12:31:32 -0400 |
commit | ba6267f5bd58dd7a3a0d6363e7ac4c27705e9f40 (patch) | |
tree | 658afb8b0500180302e837b0f90e0372c82b7062 /models-interactions/model-impl/sdnc/src/main | |
parent | f59ec395bf1e41df894f884e70ff3185280668c0 (diff) |
Fix sonar issues in models: sdc to vfc
sdc
sdnc
snr
so
vfc
Still haven't done the "rest" project yet, as still awaiting removal
of www.examples.org.
Change-Id: Icc4948799e2423bd4568232ee5629b88b7ecb996
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-impl/sdnc/src/main')
2 files changed, 7 insertions, 4 deletions
diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java index 3679625ec..7612eeb3f 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java @@ -49,6 +49,7 @@ public final class SdncManager implements Runnable { // The REST manager used for processing REST calls for this Sdnc manager private RestManager restManager; + @FunctionalInterface public interface SdncCallback { public void onCallback(SdncResponse response); } @@ -133,7 +134,7 @@ public final class SdncManager implements Runnable { logger.info(body); response.setRequestId(sdncRequest.getRequestId().toString()); - if (!response.getResponseOutput().getResponseCode().equals("200")) { + if (!"200".equals(response.getResponseOutput().getResponseCode())) { logger.info( "Sdnc Heal Restcall failed with http error code {} {}", httpDetails.first, httpDetails.second ); diff --git a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java index cfaa46fd0..090b4f9b6 100644 --- a/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java +++ b/models-interactions/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2018 Huawei. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,11 +24,12 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; public final class Serialization { - private Serialization() { - } - + public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping() .setPrettyPrinting() .create(); + private Serialization() { + + } } |