removed unnecessary calling of toString() method 33/107433/1
authorRupinder <rupinsi1@in.ibm.com>
Mon, 11 May 2020 05:52:19 +0000 (11:22 +0530)
committerRupinder <rupinsi1@in.ibm.com>
Mon, 11 May 2020 05:52:24 +0000 (11:22 +0530)
Issue-ID: USECASEUI-423
Change-Id: I79eee63ddf3169fd246b7566ddc464d05c0a46dc
Signed-off-by: Rupinder <rupinsi1@in.ibm.com>
server/src/main/java/org/onap/usecaseui/server/controller/nsmf/TaskMgtController.java
server/src/main/java/org/onap/usecaseui/server/controller/sotn/SotnController.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/PackageDistributionService.java
server/src/main/java/org/onap/usecaseui/server/service/nsmf/impl/ResourceMgtServiceImpl.java

index 71a6653..589f604 100644 (file)
@@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 @Controller
index 3cff1ef..f062aea 100644 (file)
@@ -26,7 +26,6 @@ import org.onap.usecaseui.server.bean.sotn.NetWorkResource;
 import org.onap.usecaseui.server.bean.sotn.Pinterface;
 import org.onap.usecaseui.server.bean.sotn.Pnf;
 import org.onap.usecaseui.server.service.sotn.SOTNService;
-import org.onap.usecaseui.server.util.HttpUtil;
 import org.onap.usecaseui.server.util.UuiCommonUtil;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -34,7 +33,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
index 0edaf92..027f096 100644 (file)
@@ -19,7 +19,6 @@ import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.http.HttpRequest;
 import org.onap.usecaseui.server.bean.lcm.VfNsPackageInfo;
 import org.onap.usecaseui.server.service.lcm.domain.sdc.bean.SDCServiceTemplate;
 import org.onap.usecaseui.server.service.lcm.domain.sdc.bean.Vnf;
index e6c68a3..0feef9c 100644 (file)
@@ -167,7 +167,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
                     SOOperation soOperation = response.body();
                     Gson gson = new Gson();
                     logger.info("addBusinessProgress: queryOperationProgress reponse is:{}",
-                        gson.toJson(soOperation).toString());
+                        gson.toJson(soOperation));
                     if (soOperation == null || soOperation.getOperation() == null) {
                         logger.error("addBusinessProgress: soOperation is null or getOperation() is null for businessId {}!", businessId);
                         continue;
@@ -644,14 +644,14 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
             SubscriberInfo subscriberInfo = resourceMgtServiceConvert.buildSubscriberInfo(NsmfParamConstant.CUSTOM_5G,
                 NsmfParamConstant.SERVICE_TYPE_5G);
             String jsonstr = JSON.toJSONString(subscriberInfo);
-            RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr.toString());
+            RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr);
             Response<ActivateService> activeResponse = this.soSliceService.activeService(serviceId, requestBody)
                 .execute();
 
             if (activeResponse.isSuccessful()) {
                 ActivateService activateService = activeResponse.body();
                 logger.info("activateSlicingService: activeService reponse is:{}",
-                    gson.toJson(activateService).toString());
+                    gson.toJson(activateService));
                 String operationId = activateService.getOperationId();
                 serviceActiveResult.setOperationId(operationId);
                 ServiceInstanceOperations serviceOpera = new ServiceInstanceOperations(serviceId, operationId,
@@ -699,7 +699,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
             if (activeResponse.isSuccessful()) {
                 ActivateService activateService = activeResponse.body();
                 logger.info("deactivateSlicingService: deactiveService reponse is:{}",
-                    gson.toJson(activateService).toString());
+                    gson.toJson(activateService));
                 String operationId = activateService.getOperationId();
                 serviceDeactivateResult.setOperationId(operationId);
                 ServiceInstanceOperations serviceOpera = new ServiceInstanceOperations(serviceId, operationId,
@@ -740,14 +740,14 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
             SubscriberInfo subscriberInfo = resourceMgtServiceConvert.buildSubscriberInfo(NsmfParamConstant.CUSTOM_5G,
                 NsmfParamConstant.SERVICE_TYPE_5G);
             String jsonstr = JSON.toJSONString(subscriberInfo);
-            RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr.toString());
+            RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), jsonstr);
             Response<ActivateService> activeResponse = this.soSliceService.terminateService(serviceId, requestBody)
                 .execute();
 
             if (activeResponse.isSuccessful()) {
                 ActivateService activateService = activeResponse.body();
                 logger.info("terminateSlicingService: terminateService reponse is:{}",
-                    gson.toJson(activateService).toString());
+                    gson.toJson(activateService));
                 String operationId = activateService.getOperationId();
                 serviceTerminateResult.setOperationId(activateService.getOperationId());
                 ServiceInstanceOperations serviceOpera = new ServiceInstanceOperations(serviceId, operationId,
@@ -796,7 +796,7 @@ public class ResourceMgtServiceImpl implements ResourceMgtService {
                     SOOperation soOperation = response.body();
                     Gson gson = new Gson();
                     logger.info("queryOperationProgress: queryOperationProgress reponse is:{}",
-                        gson.toJson(soOperation).toString());
+                        gson.toJson(soOperation));
                     if (soOperation == null || soOperation.getOperation() == null
                         || soOperation.getOperation().getOperation() == null) {
                         logger.error("queryOperationProgress: soOperation is null or getOperation() is null!");