diff options
author | Magnusen, Drew (dm741q) <dm741q@att.com> | 2017-08-16 15:21:15 -0500 |
---|---|---|
committer | Magnusen, Drew (dm741q) <dm741q@att.com> | 2017-08-18 14:40:18 -0500 |
commit | 6d7e231986b84cf6646e46beba7e7e05699bffe6 (patch) | |
tree | e08ebda96bc5797d64dd66e667303cf55ad87491 /controlloop/common/model-impl/aai | |
parent | 5ae90a9bf72d2d6dbb163c3dbea5474b657be7e7 (diff) |
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) <dm741q@att.com>
Diffstat (limited to 'controlloop/common/model-impl/aai')
-rw-r--r-- | controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java index e02021a43..b079122e4 100644 --- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java @@ -28,10 +28,13 @@ import org.onap.policy.aai.AAIGETResponse; import org.onap.policy.aai.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 AAINQF199Manager { + private static final Logger logger = LoggerFactory.getLogger(AAINQF199Manager.class); public static AAINQF199Response postQuery(String url, String username, String password, AAINQF199Request request, UUID requestID) { @@ -57,7 +60,7 @@ public final class AAINQF199Manager { AAINQF199Response response = Serialization.gsonPretty.fromJson(httpDetails.b, AAINQF199Response.class); return response; } catch (JsonSyntaxException e) { - System.err.println("Failed to deserialize into AAIResponse" + e.getLocalizedMessage()); + logger.error("postQuery threw: ", e); } } @@ -93,7 +96,7 @@ public final class AAINQF199Manager { responseGet = Serialization.gsonPretty.fromJson(httpDetailsGet.b, AAIGETResponse.class); return responseGet; } catch (JsonSyntaxException e) { - System.err.println("Failed to deserialize into AAIResponse" + e.getLocalizedMessage()); + logger.error("getQuery threw: ", e); } } try { |