From 6d7e231986b84cf6646e46beba7e7e05699bffe6 Mon Sep 17 00:00:00 2001 From: "Magnusen, Drew (dm741q)" Date: Wed, 16 Aug 2017 15:21:15 -0500 Subject: Code cleanup to resolve critical sonar issues Code cleanup mostly involed directing the output of exception messages to the correct logger stream. Issue-ID: [POLICY-115] Change-Id: I2042bac3d3b0991a2ebed33421a73f1aa300c7c1 Signed-off-by: Magnusen, Drew (dm741q) --- .../mso/src/main/java/org/onap/policy/mso/MSOManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'controlloop/common/model-impl/mso/src/main') diff --git a/controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java b/controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java index 79725901a..81d43ef76 100644 --- a/controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java +++ b/controlloop/common/model-impl/mso/src/main/java/org/onap/policy/mso/MSOManager.java @@ -26,11 +26,15 @@ import java.util.Map; import org.onap.policy.mso.util.Serialization; import org.onap.policy.rest.RESTManager; import org.onap.policy.rest.RESTManager.Pair; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.gson.JsonSyntaxException; public final class MSOManager { + private static final Logger logger = LoggerFactory.getLogger(MSOManager.class); + public static MSOResponse createModuleInstance(String url, String urlBase, String username, String password, MSORequest request) { // @@ -87,9 +91,9 @@ public final class MSOManager { System.out.println("***** ######## VF Module Creation timeout. Status: ("+responseGet.request.requestStatus.requestState+")"); return responseGet; } catch (JsonSyntaxException e) { - System.err.println("Failed to deserialize into MSOResponse" + e.getLocalizedMessage()); + logger.error("Failed to deserialize into MSOResponse: ", e); } catch (InterruptedException e) { - System.err.println("Interrupted exception: " + e.getLocalizedMessage()); + logger.error("Interrupted exception: ", e); } } -- cgit 1.2.3-korg