diff options
2 files changed, 11 insertions, 11 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java index 6fd9cb03..a53976f5 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java @@ -108,12 +108,12 @@ public class ResourceMonitorServiceImpl implements ResourceMonitorService { TrafficReqInfo trafficReqInfo = resourceMonitorServiceConvert .buildTrafficReqInfo(serviceInfo, newTimestamp); String jsonstr = JSON.toJSONString(trafficReqInfo); - RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr.toString()); + RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr); Response<KpiTotalTraffic> response = this.kpiSliceService.listTotalTraffic(requestBody).execute(); if (response.isSuccessful()) { KpiTotalTraffic kpiTotalTraffic = response.body(); logger.info("querySlicingUsageTraffic: listTotalTraffic reponse is:{}", - gson.toJson(kpiTotalTraffic).toString()); + gson.toJson(kpiTotalTraffic)); UsageTrafficInfo usageTrafficInfo = new UsageTrafficInfo(); resourceMonitorServiceConvert.convertUsageTrafficInfo(usageTrafficInfo, kpiTotalTraffic); usageTrafficInfoList.add(usageTrafficInfo); @@ -160,13 +160,13 @@ public class ResourceMonitorServiceImpl implements ResourceMonitorService { SlicingKpiReqInfo slicingKpiReqInfo = resourceMonitorServiceConvert .buildSlicingKpiReqInfo(serviceInfo, newTimestamp, kpiHours); String jsonstr = JSON.toJSONString(slicingKpiReqInfo); - RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr.toString()); + RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr); Response<KpiUserNumber> response = this.kpiSliceService.listUserNumber(requestBody).execute(); if (response.isSuccessful()) { KpiUserNumber kpiUserNumber = response.body(); logger.info("querySlicingOnlineUserNumber: listUserNumber reponse is:{}", - gson.toJson(kpiUserNumber).toString()); + gson.toJson(kpiUserNumber)); ServiceOnlineUserInfo serviceOnlineUserInfo = new ServiceOnlineUserInfo(); resourceMonitorServiceConvert.convertServiceOnlineUserInfo(serviceOnlineUserInfo, kpiUserNumber); serviceOnlineUserInfoList.add(serviceOnlineUserInfo); @@ -215,13 +215,13 @@ public class ResourceMonitorServiceImpl implements ResourceMonitorService { SlicingKpiReqInfo slicingKpiReqInfo = resourceMonitorServiceConvert .buildSlicingKpiReqInfo(serviceInfo, newTimestamp, kpiHours); String jsonstr = JSON.toJSONString(slicingKpiReqInfo); - RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr.toString()); + RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr); Response<KpiTotalBandwidth> response = this.kpiSliceService.listTotalBandwidth(requestBody).execute(); if (response.isSuccessful()) { KpiTotalBandwidth kpiTotalBandwidth = response.body(); logger.info("querySlicingTotalBandwidth: listTotalBandwidth reponse is:{}", - gson.toJson(kpiTotalBandwidth).toString()); + gson.toJson(kpiTotalBandwidth)); ServiceTotalBandwidthInfo serviceTotalBandwidthInfo = new ServiceTotalBandwidthInfo(); resourceMonitorServiceConvert .convertServiceTotalBandwidthInfo(serviceTotalBandwidthInfo, kpiTotalBandwidth); diff --git a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java index eec8ab0c..830b24a9 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java @@ -163,7 +163,7 @@ public class TaskMgtServiceImpl implements TaskMgtService { if (response.isSuccessful()) { SOTask soTaskInfo = response.body(); Gson gson = new Gson(); - logger.info("queryTaskAuditInfo: getTaskById response is:{}", gson.toJson(soTaskInfo).toString()); + logger.info("queryTaskAuditInfo: getTaskById response is:{}", gson.toJson(soTaskInfo)); taskMgtServiceConvert.convertTaskAuditInfo(slicingTaskAuditInfo, soTaskInfo); // return normal result code resultMsg = "5G slicing task configure audit information query result."; @@ -199,11 +199,11 @@ public class TaskMgtServiceImpl implements TaskMgtService { if (response.isSuccessful()) { SOTask soTaskInfo = response.body(); Gson gson = new Gson(); - logger.info("updateTaskAuditInfo: getTaskById response is:{}", gson.toJson(soTaskInfo).toString()); + logger.info("updateTaskAuditInfo: getTaskById response is:{}", gson.toJson(soTaskInfo)); taskMgtServiceConvert.convertTaskAuditToSoTask(soTaskInfo, slicingTaskAuditInfo); String jsonstr = JSON.toJSONString(soTaskInfo); - RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr.toString()); + RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr); Response<ResponseBody> updateResponse = soSliceService .updateService(slicingTaskAuditInfo.getTaskId(), requestBody).execute(); @@ -261,7 +261,7 @@ public class TaskMgtServiceImpl implements TaskMgtService { if (response.isSuccessful()) { Gson gson = new Gson(); SOTask soTask = response.body(); - logger.info("updateTaskAuditInfo: getTaskById response is:{}", gson.toJson(soTask).toString()); + logger.info("updateTaskAuditInfo: getTaskById response is:{}", gson.toJson(soTask)); taskMgtServiceConvert.convertTaskCreationInfo(slicingTaskCreationInfo, soTask); // return normal result code resultMsg = "5G slicing task creation infomation query result."; @@ -302,7 +302,7 @@ public class TaskMgtServiceImpl implements TaskMgtService { if (response.isSuccessful()) { SOTask soTask = response.body(); Gson gson = new Gson(); - logger.info("queryTaskCreationProgress: getTaskById response is:{}", gson.toJson(soTask).toString()); + logger.info("queryTaskCreationProgress: getTaskById response is:{}", gson.toJson(soTask)); taskMgtServiceConvert.convertTaskCreationProgress(slicingTaskCreationProgress, soTask); resultMsg = "5G slicing task operation progress query result."; resultHeader.setResult_code(NsmfCodeConstant.SUCCESS_CODE); |