diff options
author | xu ran <xuranyjy@chinamobile.com> | 2020-05-14 03:24:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-14 03:24:49 +0000 |
commit | 60874591dcc55add9b4fbea5a2ce220d0707cb80 (patch) | |
tree | dc2116a3e39de82fad4a2faf2d317ab6063d14d3 | |
parent | e490780cbf141a6e1d81ef256ea81bc023cb37e1 (diff) | |
parent | 62bf1f64cce928c8709952a4b4cd6829d95f8060 (diff) |
Merge "removed unnecessary calling of .tostring() method"
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); |