Remove redundant toString 51/32451/1
authorMunir Ahmad <munir.ahmad@bell.ca>
Wed, 21 Feb 2018 21:40:26 +0000 (16:40 -0500)
committerMunir Ahmad <munir.ahmad@bell.ca>
Wed, 21 Feb 2018 21:40:26 +0000 (16:40 -0500)
Change-Id: If039248f233e3aa53733aa1a888b571836ca9406
Issue-ID: SO-437
Signed-off-by: Munir Ahmad <munir.ahmad@bell.ca>
bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponent.java
mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/HeatTemplateTest.java

index 698f0c5..60bc83b 100644 (file)
@@ -77,7 +77,7 @@ public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask
         httpPost.addHeader("Authorization", defaulAuth);
         httpPost.addHeader("Content-type", "application/json");
         String postBody = getPostbody(inputEntity);
-        LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody.toString(), "SDNC", "");
+        LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC", "");
         httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
         httpPost(url, httpPost);
         logger.info("SdncNetworkTopologyOperationTask.Send2SdncDirectly end!");
index 89d0958..6028944 100644 (file)
@@ -77,7 +77,7 @@ public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask
         httpPost.addHeader("Authorization", defaulAuth);
         httpPost.addHeader("Content-type", "application/json");
         String postBody = getPostbody(inputEntity);
-        LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody.toString(), "SDNC", "");
+        LOGGER.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC", "");
         httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
         httpPost(url, httpPost);
         logger.info("SdncServiceTopologyOperationTask.Send2SdncDirectly end!");
index a61ca5f..a55c13b 100644 (file)
@@ -711,12 +711,12 @@ public class VnfRequestHandler {
                 requestClient = RequestClientFactory.getRequestClient (orchestrationURI, props);
                 // Capture audit event
                 msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
-                response = requestClient.post (msoRequest.getRequestXML (),
-                        requestId,
-                        Integer.toString (recipe.getRecipeTimeout ()).toString (),
-                        version,
-                        null,
-                        null);
+                response = requestClient.post(msoRequest.getRequestXML(),
+                    requestId,
+                    Integer.toString(recipe.getRecipeTimeout()),
+                    version,
+                    null,
+                    null);
                 msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", orchestrationURI, null);
             } catch (Exception e) {
                 msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", orchestrationURI, null);
index 9a8bf35..2c1f506 100644 (file)
@@ -652,12 +652,12 @@ public class VolumeRequestHandler {
                 requestClient = RequestClientFactory.getRequestClient (orchestrationURI, props);
                 // Capture audit event
                 msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ());
-                response = requestClient.post (msoRequest.getRequestXML (),
-                        requestId,
-                        Integer.toString (recipe.getRecipeTimeout ()).toString (),
-                        version,
-                        null,
-                        null);
+                response = requestClient.post(msoRequest.getRequestXML(),
+                    requestId,
+                    Integer.toString(recipe.getRecipeTimeout()),
+                    version,
+                    null,
+                    null);
                 msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", orchestrationURI, null);
             } catch (Exception e) {
                 msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError, "Exception while communicate with BPMN engine", "BPMN", orchestrationURI, null);
index b0a8c3e..8db4902 100644 (file)
@@ -109,7 +109,7 @@ public class VnfComponent implements Serializable {
     public int hashCode () {
         // return the hashCode of the concat string of type+vnfId - should be okay.
         int result = 0;
-        result = (this.componentType + this.vnfId).toString().hashCode();
+        result = (this.componentType + this.vnfId).hashCode();
         return result;
     }
 }
index c3d5357..cf79d5b 100644 (file)
@@ -67,7 +67,7 @@ public class HeatTemplateTest {
         heatTemplate.setParameters (set);
         String heatStr = heatTemplate.toString (); 
         assertTrue (heatStr.contains ("param name"));
-        assertTrue (heatStr.toString ().contains ("param 2(reqd)"));
+        assertTrue (heatStr.contains ("param 2(reqd)"));
 
         File tempFile;
         try {