From 60be4e21f1ada02fbbdb39cc47ff1c69c098a00a Mon Sep 17 00:00:00 2001 From: vasraz Date: Wed, 20 Nov 2019 17:32:02 +0000 Subject: Fix Sonar issue Major SmellCode: Replace StringBuffer with StringBuilder Change-Id: I0283e5160e5c1f23423c66110015f18c8163411e Signed-off-by: Vasyl Razinkov Issue-ID: SDC-2670 --- .../sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java | 2 +- .../model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'catalog-model/src') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java index ab08f5c339..d5e0675203 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaOperationFacade.java @@ -1365,7 +1365,7 @@ public class ToscaOperationFacade { propOwner = fetchedCIOptional.get().getSourceModelUid(); } StorageOperationStatus status; - StringBuffer sb = new StringBuffer(componentInstanceId); + StringBuilder sb = new StringBuilder(componentInstanceId); sb.append(ModelConverter.CAP_PROP_DELIM).append(propOwner).append(ModelConverter.CAP_PROP_DELIM) .append(capabilityDefinition.getType()).append(ModelConverter.CAP_PROP_DELIM).append(capabilityDefinition.getName()); String capKey = sb.toString(); diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java index 390e27ee0b..9c9194828e 100644 --- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java +++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/NodeTemplateOperationGraphTest.java @@ -211,7 +211,7 @@ public class NodeTemplateOperationGraphTest extends ModelTestBase{ } private String buildInstanceId(int originIndex, int insIndex) { - StringBuffer sb = new StringBuffer("instanceId_"); + StringBuilder sb = new StringBuilder("instanceId_"); sb.append(originIndex).append("-").append(insIndex); return sb.toString(); } -- cgit 1.2.3-korg