summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-05-12 14:22:17 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-05-12 14:22:37 +0530
commit62bf1f64cce928c8709952a4b4cd6829d95f8060 (patch)
tree7170cad952774d8d72dd43c3094bc46851e6dcc1
parent27e10ee2672295aa593b6483d365a16b06da1ff2 (diff)
removed unnecessary calling of .tostring() method
Issue-ID: USECASEUI-423 Change-Id: I1eb1e3ed0ee5606d23f877f2c8cc7972b97ba891 Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMonitorServiceImpl.java12
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/TaskMgtServiceImpl.java10
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);