From 1beaa908abebcb3d0f5a8ac7e80e3604d5b9f638 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Sat, 24 Feb 2018 12:34:32 -0500 Subject: Swap StringBuffer with StringBuilder everywhere Change-Id: Ia1f8d3ebc4026179bf08cdb0bd71c4480b8481df Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- .../src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java | 4 ++-- .../java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java | 2 +- .../src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bpmn/MSOCoreBPMN') diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java index 204d9e4e5e..584ccda1ac 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java @@ -238,7 +238,7 @@ public class HealthCheckHandler { BPMNLogger.debug(healthcheckDebugEnabled, "Post url is: " + url); //now create a soap request message as follows: - final StringBuffer payload = new StringBuffer(); + final StringBuilder payload = new StringBuilder(); payload.append("\n"); payload.append("\n"); payload.append("\n"); @@ -270,7 +270,7 @@ public class HealthCheckHandler { BufferedReader rd = new BufferedReader( new InputStreamReader(response.getEntity().getContent())); - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); String line = ""; while ((line = rd.readLine()) != null) { result.append(line); diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java index 0e985cc8f1..f5283f4579 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java @@ -150,7 +150,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable { */ @JsonIgnore public String getServiceResourcesJsonString(){ - StringBuffer serviceResourcesJsonStringBuffer = new StringBuffer(); + StringBuilder serviceResourcesJsonStringBuffer = new StringBuilder(); serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceNetworks()))); serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceVnfs()))); serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceAllottedResources()))); diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java index 640dc697a2..b47d73f665 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java @@ -122,7 +122,7 @@ public class JsonUtils { * @return String containing the XML translation */ public static String toXMLString(Object obj, String tagName) throws JSONException { - StringBuffer strBuf = new StringBuffer(); + StringBuilder strBuf = new StringBuilder(); int i; JSONArray jsonArr; JSONObject jsonObj; -- cgit 1.2.3-korg