summaryrefslogtreecommitdiffstats
path: root/adapters/mso-vnf-adapter
diff options
context:
space:
mode:
authorMunir Ahmad <munir.ahmad@bell.ca>2018-02-21 16:44:58 -0500
committerMunir Ahmad <munir.ahmad@bell.ca>2018-02-21 16:46:08 -0500
commit18b29b863206deeba869fcd2738ea8ffce20b962 (patch)
tree30f21d8824c892747978a72179302d6b451185f1 /adapters/mso-vnf-adapter
parentf5b9e7cda13e239024335a3f9b08bfc9a4ec9fca (diff)
Swap String concatenation with StringBuilder
Change-Id: I5c43d3267e5f75623bcc837e27c57a6ad6aa8877 Issue-ID: SO-437 Signed-off-by: Munir Ahmad <munir.ahmad@bell.ca>
Diffstat (limited to 'adapters/mso-vnf-adapter')
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java16
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 {