diff options
author | ezhil <ezhrajam@in.ibm.com> | 2019-01-04 16:09:18 +0530 |
---|---|---|
committer | ezhil <ezhrajam@in.ibm.com> | 2019-01-04 16:09:27 +0530 |
commit | ffa9f24a0a0fb26eb09ad7fc74a82456409c53a4 (patch) | |
tree | b6ec629651a0074141a094563a23cc7bb1a84f0d /aai-service | |
parent | e6eb5bfb02077473d20061bd16faf6c1a6fa4af4 (diff) |
Fixed major sonar issues in AAIClientRESTExecutor
Change-Id: Ibeb24cd357f099f9f85da05a7da2e0ebe42b679f
Issue-ID: CCSDK-906
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
Diffstat (limited to 'aai-service')
-rwxr-xr-x | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java index d362d0e06..53fcd9f4d 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java @@ -142,7 +142,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { String extension = keystorePath.substring(keystorePath.lastIndexOf(".") + 1); - if(extension != null && !extension.isEmpty() && extension.equalsIgnoreCase("JKS")) { + if(extension != null && !extension.isEmpty() && "JKS".equalsIgnoreCase(extension)) { storeType = "JKS"; } KeyStore ks = KeyStore.getInstance(storeType); @@ -609,7 +609,8 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { } URL requestUrl = null; - HttpURLConnection con = getConfiguredConnection(requestUrl = request.getRequestUrl("PATCH", resourceVersion), "PATCH"); + requestUrl = request.getRequestUrl("PATCH", resourceVersion); + HttpURLConnection con = getConfiguredConnection(requestUrl, "PATCH"); ObjectMapper mapper = AAIService.getObjectMapper(); String jsonText = request.toJSONString(); @@ -631,6 +632,7 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { try { responseMessage = con.getResponseMessage(); } catch(Exception exc) { + LOG.info("Exception occured", exc.getMessage()); responseMessage = EnglishReasonPhraseCatalog.INSTANCE.getReason(responseCode,null); } finally { if(responseMessage == null) |