diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-09-03 02:31:23 +0530 |
---|---|---|
committer | Sandeep J <sandeejh@in.ibm.com> | 2018-09-03 02:32:32 +0530 |
commit | 22f6bf8f3e328fa30dfc0991d88d6b22d9bc8688 (patch) | |
tree | 45ca3e5304da3f6722b1e6b100898233c06f90d9 /adapters/mso-vfc-adapter/src/main/java | |
parent | b1c2cbe73420cbb62f643488422f174fe3311b1c (diff) |
fixed sonar issue in RestfulUtil.java
fixed sonar issue detailed in SO-951
Issue-ID: SO-951
Change-Id: Ic4a086f339187a6c9d802d5ea09acd0c4416e7c9
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'adapters/mso-vfc-adapter/src/main/java')
-rw-r--r-- | adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java index 5b8779a67d..0536dd3560 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java @@ -5,6 +5,8 @@ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018. + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -73,6 +75,8 @@ public class RestfulUtil { private static final String DEFAULT_MSB_IP = "127.0.0.1"; private static final Integer DEFAULT_MSB_PORT = 80; + + private static final String VFC_ADAPTER="VFC Adapter"; @Autowired private Environment env; @@ -95,7 +99,7 @@ public class RestfulUtil { public RestfulResponse send(String url, String methodType, String content) { String msbUrl = getMsbHost() + url; - LOGGER.info(MessageEnum.RA_NS_EXC, "Begin to sent message " + methodType +": " + msbUrl, "org.onap.so.adapters.vfc.util.RestfulUtil","VFC Adapter"); + LOGGER.info(MessageEnum.RA_NS_EXC, "Begin to sent message " + methodType +": " + msbUrl, "org.onap.so.adapters.vfc.util.RestfulUtil",VFC_ADAPTER); HttpRequestBase method = null; HttpResponse httpResponse = null; @@ -196,12 +200,12 @@ public class RestfulUtil { } private static void logError(String errMsg, Throwable t) { - LOGGER.error(MessageEnum.RA_NS_EXC, "VFC Adapter", "", MsoLogger.ErrorCode.AvailabilityError, errMsg, t); + LOGGER.error(MessageEnum.RA_NS_EXC, VFC_ADAPTER, "", MsoLogger.ErrorCode.AvailabilityError, errMsg, t); ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg); } private static void logError(String errMsg) { - LOGGER.error(MessageEnum.RA_NS_EXC, "VFC Adapter", "", MsoLogger.ErrorCode.AvailabilityError, errMsg); + LOGGER.error(MessageEnum.RA_NS_EXC, VFC_ADAPTER, "", MsoLogger.ErrorCode.AvailabilityError, errMsg); ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, errMsg); } |