diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2018-02-22 06:09:06 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-02-22 06:09:06 +0000 |
commit | 5ed10df2f1e3d39562293411ba09765b453228a6 (patch) | |
tree | c57179ddc53bf7479bcfbe0e82fd9537a6dbc9c0 /adapters/mso-vnf-adapter | |
parent | 0cc4c1a89e0954ca5d71d97d8ec4e983e96aef2f (diff) | |
parent | 18b29b863206deeba869fcd2738ea8ffce20b962 (diff) |
Merge "Swap String concatenation with StringBuilder"
Diffstat (limited to 'adapters/mso-vnf-adapter')
-rw-r--r-- | adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java index 7fe09be2b6..a292c76825 100644 --- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java +++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java @@ -1170,7 +1170,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { } // Check that required parameters have been supplied - String missingParams = null; + StringBuilder missingParams = null; List <String> paramList = new ArrayList <> (); // New for 1510 - consult the PARAM_ALIAS field to see if we've been @@ -1264,9 +1264,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { } else { LOGGER.debug ("adding to missing parameters list: " + parm.getParamName ()); if (missingParams == null) { - missingParams = parm.getParamName (); + missingParams = new StringBuilder(parm.getParamName()); } else { - missingParams += "," + parm.getParamName (); + missingParams.append("," + parm.getParamName()); } } } @@ -1276,7 +1276,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { if (checkRequiredParameters) { // Problem - missing one or more required parameters String error = "Create VFModule: Missing Required inputs: " + missingParams; - LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, "OpenStack", "", MsoLogger.ErrorCode.DataError, "Create VFModule: Missing Required inputs"); + LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams.toString(), "OpenStack", "", MsoLogger.ErrorCode.DataError, "Create VFModule: Missing Required inputs"); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error); throw new VnfException (error, MsoExceptionCategory.USERDATA); } else { @@ -1871,7 +1871,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { } // Check that required parameters have been supplied - String missingParams = null; + StringBuilder missingParams = null; List <String> paramList = new ArrayList <> (); // New for 1510 - consult the PARAM_ALIAS field to see if we've been @@ -2009,9 +2009,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { else { LOGGER.debug ("adding to missing parameters list: " + parm.getParamName ()); if (missingParams == null) { - missingParams = parm.getParamName (); + missingParams = new StringBuilder(parm.getParamName()); } else { - missingParams += "," + parm.getParamName (); + missingParams.append("," + parm.getParamName()); } } } @@ -2021,7 +2021,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter { // Problem - missing one or more required parameters if (checkRequiredParameters) { String error = "Update VNF: Missing Required inputs: " + missingParams; - LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams, "OpenStack", "", MsoLogger.ErrorCode.DataError, error); + LOGGER.error (MessageEnum.RA_MISSING_PARAM, missingParams.toString(), "OpenStack", "", MsoLogger.ErrorCode.DataError, error); LOGGER.recordAuditEvent (startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, error); throw new VnfException (error, MsoExceptionCategory.USERDATA); } else { |