From 0eb2b3c81039b28b752d7e271ae0572a1eb35fcb Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Fri, 22 Sep 2017 10:55:16 +0530 Subject: Use Integer.toString() for type conversion Major sonar issue in sli/adaptors module *Intead of implicit type conversion use static method to save memory and cycles Issue-Id: CCSDK-87 Change-Id: Icb75229ffb41bdf8b683f2a306acc856ce9106f6 Signed-off-by: surya-huawei --- .../main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java index 04a0c593..0cc23de9 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIDeclarations.java @@ -281,7 +281,7 @@ public abstract class AAIDeclarations implements AAIClient { } catch (AAIServiceException aaiexc) { ctx.setAttribute(prefix + ".error.message", aaiexc.getMessage()); if (aaiexc.getReturnCode() >= 300) { - ctx.setAttribute(prefix + ".error.http.response-code", "" + aaiexc.getReturnCode()); + ctx.setAttribute(prefix + ".error.http" + "" + ".response-code", Integer.toString(aaiexc.getReturnCode())); } if (aaiexc.getReturnCode() == 404) @@ -303,7 +303,7 @@ public abstract class AAIDeclarations implements AAIClient { } catch (AAIServiceException aaiexc) { ctx.setAttribute(prefix + ".error.message", aaiexc.getMessage()); if (aaiexc.getReturnCode() >= 300) { - ctx.setAttribute(prefix + ".error.http.response-code", "" + aaiexc.getReturnCode()); + ctx.setAttribute(prefix + ".error.http" + ".response-code", Integer.toString(aaiexc.getReturnCode())); } if (aaiexc.getReturnCode() == 404) @@ -521,7 +521,7 @@ public abstract class AAIDeclarations implements AAIClient { if(exc instanceof AAIServiceException) { AAIServiceException aaiexc = (AAIServiceException)exc; if(aaiexc.getReturnCode() >= 300) { - ctx.setAttribute(prefix + ".error.http.response-code", "" + aaiexc.getReturnCode()); + ctx.setAttribute(prefix + ".error.http" + ".response-code", Integer.toString(aaiexc.getReturnCode())); } if(aaiexc.getReturnCode() == 404) { -- cgit 1.2.3-korg