From 26606eb22e59fae9df5759ec5f53420a4bac8847 Mon Sep 17 00:00:00 2001 From: rama-huawei Date: Tue, 26 Sep 2017 17:46:40 +0530 Subject: Repalced StringBuffer with StringBuilder Issue-Id:SO-118 Change-Id: I7c69443dc5c17690605c4d1844823fd4307e9ccb Signed-off-by: rama-huawei --- .../mso/adapters/catalogdb/catalogrest/QueryVfModule.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'adapters/mso-catalog-db-adapter/src/main/java') diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java index 4675858936..309aa0641a 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java @@ -50,10 +50,10 @@ public class QueryVfModule extends CatalogQuery { "\t}"; // "\t}}"; - public QueryVfModule() { super(); vfModules = new ArrayList(); } + public QueryVfModule() { super(); vfModules = new ArrayList<>(); } public QueryVfModule(List vlist) { LOGGER.debug ("QueryVfModule:"); - vfModules = new ArrayList(); + vfModules = new ArrayList<>(); if (vlist != null) { for (VfModuleCustomization o : vlist) { LOGGER.debug ("-- o is a vfModules ----"); @@ -69,7 +69,7 @@ public class QueryVfModule extends CatalogQuery { @Override public String toString () { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); boolean first = true; int i = 1; @@ -83,9 +83,9 @@ public class QueryVfModule extends CatalogQuery { @Override public String JSON2(boolean isArray, boolean x) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); if (isArray) buf.append("\"vfModules\": ["); - Map valueMap = new HashMap(); + Map valueMap = new HashMap<>(); String sep = ""; boolean first = true; @@ -95,7 +95,7 @@ public class QueryVfModule extends CatalogQuery { boolean vfNull = o.getVfModule() == null ? true : false; boolean hasVolumeGroup = false; String envt = o.getHeatEnvironmentArtifactUuid(); - if (envt != null && !envt.equals("")) { + if (envt != null && !"".equals(envt)) { hasVolumeGroup = true; } @@ -116,4 +116,4 @@ public class QueryVfModule extends CatalogQuery { if (isArray) buf.append("]"); return buf.toString(); } -} \ No newline at end of file +} -- cgit 1.2.3-korg