diff options
author | Parshad Patel <pars.patel@samsung.com> | 2019-04-22 13:09:58 +0900 |
---|---|---|
committer | Parshad Patel <pars.patel@samsung.com> | 2019-04-22 13:23:52 +0900 |
commit | 73e90ce42013fbd2ee87477a2cd8c72eb234df3d (patch) | |
tree | bf3a8dd08f34972500f401049481f6dd73ae61e8 /vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java | |
parent | f2dc71a2443c29c00da7750230015d6555e86b1f (diff) |
Fix sonar issues in vid
Fix A "NullPointerException" could be thrown issue
Fix Either log or rethrow this exception issue
Issue-ID: VID-464
Change-Id: I92fc200bf019fc335dde8a27b50e36cefffda440
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java index 6a8439fee..1710d984f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java @@ -195,6 +195,7 @@ public class AaiClient implements AaiClientInterface { return new AaiResponse(e.getCause(), "AAI response parsing Error" , HttpStatus.SC_INTERNAL_SERVER_ERROR); } catch (Exception e) { + logger.error(EELFLoggerDelegate.errorLogger,"Exception in aai response parsing", e); return new AaiResponse(e.getCause(), "Got " + aaiResponse.getHttpCode() + " from a&ai" , aaiResponse.getHttpCode()); } } @@ -335,8 +336,8 @@ public class AaiClient implements AaiClientInterface { encodedParam= URLEncoder.encode(param, "UTF-8"); } catch (UnsupportedEncodingException e) { String methodName = "getUrlFromList"; - logger.error(EELFLoggerDelegate.errorLogger, methodName + e.toString()); - logger.debug(EELFLoggerDelegate.debugLogger, methodName + e.toString()); + logger.error(EELFLoggerDelegate.errorLogger, methodName, e); + logger.debug(EELFLoggerDelegate.debugLogger, methodName, e); } url = url.concat(encodedParam); if(i != params.size()){ |