aboutsummaryrefslogtreecommitdiffstats
path: root/test-apis-ci/src/main
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2019-11-20 17:32:02 +0000
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-11-25 08:21:43 +0000
commit60be4e21f1ada02fbbdb39cc47ff1c69c098a00a (patch)
tree8d05c95e8b856255564fd6f9f1e1c096f77b5567 /test-apis-ci/src/main
parentfe540e1d6e3f0155741a4b4bc48f5ec56f114852 (diff)
Fix Sonar issue
Major SmellCode: Replace StringBuffer with StringBuilder Change-Id: I0283e5160e5c1f23423c66110015f18c8163411e Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-2670
Diffstat (limited to 'test-apis-ci/src/main')
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/CsarUtilsTest.java6
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java2
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java2
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/BaseRestUtils.java2
4 files changed, 6 insertions, 6 deletions
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/CsarUtilsTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/CsarUtilsTest.java
index 56502757de..fd1703bfcb 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/CsarUtilsTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/imports/CsarUtilsTest.java
@@ -153,7 +153,7 @@ public class CsarUtilsTest extends ComponentBaseTest {
String resourceYaml = null;
byte[] buffer = new byte[1024];
ZipEntry nextEntry = zip.getNextEntry();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int len;
while ((len = zip.read(buffer)) > 0) {
@@ -203,7 +203,7 @@ public class CsarUtilsTest extends ComponentBaseTest {
String resourceYaml = null;
byte[] buffer = new byte[1024];
ZipEntry nextEntry = zip.getNextEntry();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int len;
while ((len = zip.read(buffer)) > 0) {
@@ -311,7 +311,7 @@ public class CsarUtilsTest extends ComponentBaseTest {
String resourceYaml = null;
byte[] buffer = new byte[1024];
ZipEntry nextEntry = zip.getNextEntry();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int len;
while ((len = zip.read(buffer)) > 0) {
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java
index 071624676f..eabf057715 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/service/CreateServiceMetadataApiTest.java
@@ -631,7 +631,7 @@ public class CreateServiceMetadataApiTest extends ComponentBaseTest {
// fill new service details
ServiceReqDetails serviceDetails = ElementFactory.getDefaultService();
- StringBuffer tagBuffer = new StringBuffer();
+ StringBuilder tagBuffer = new StringBuilder();
for (int i = 0; i < 1025; i++) {
tagBuffer.append("a");
}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java
index 8e5079db92..43c93e47a6 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/general/AtomicOperationUtils.java
@@ -774,7 +774,7 @@ public final class AtomicOperationUtils {
// Get the CSARs path
String realFilePath = System.getProperty("user.dir") + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "CI" + File.separator + "csars" ;
if (filePath != null && filePath.length > 0) {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for(String currStr: filePath){
result.append(currStr);
}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/BaseRestUtils.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/BaseRestUtils.java
index 56859ff56a..b8ec35f0ff 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/BaseRestUtils.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/BaseRestUtils.java
@@ -179,7 +179,7 @@ public class BaseRestUtils extends BaseValidationUtils {
int statusCode = response.getStatusLine().getStatusCode();
postResponse.setErrorCode(statusCode);
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
try {
BufferedReader in = new BufferedReader(new InputStreamReader(responseEntity.getContent()));
String inputLine;