diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-10-23 05:15:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-10-23 05:15:37 +0000 |
commit | 859e445816b9c16011ea79d60c860aa59f869a26 (patch) | |
tree | 4eb2b305bdf81101ce90a5aff6778d024f2956ca /adapters/mso-adapter-utils/src/main/java/org/openecomp | |
parent | 08c2b92918259dc20030a22a5c6e0214d7161a48 (diff) | |
parent | b945dbd30ae86f01797a710acb29fb75b5199bd5 (diff) |
Merge "Use StringBuilder"
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org/openecomp')
2 files changed, 9 insertions, 3 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java index ff1cd43b05..b8a7a5571c 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java @@ -61,6 +61,6 @@ public abstract class MsoException extends Exception if (this.context == null) return getMessage(); else - return ("[" + context + "] " + getMessage()); + return "[" + context + "] " + getMessage(); } } diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java index a62339d0f4..8aa8d3f5e8 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java +++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java @@ -71,7 +71,13 @@ public class MsoOpenstackException extends MsoException @Override public String toString () { - String error = "" + statusCode + " " + statusMessage + ": " + errorDetail; - return error; + StringBuilder error = new StringBuilder(); + error.append(""); + error.append(statusCode); + error.append(" "); + error.append(statusMessage); + error.append(": "); + error.append(errorDetail); + return error.toString(); } } |