summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorRamanjaneya-Huawei <ramanjaneya.palleti@huawei.com>2017-10-19 11:23:29 +0530
committerRamanjaneya-Huawei <ramanjaneya.palleti@huawei.com>2017-10-19 11:24:39 +0530
commitb945dbd30ae86f01797a710acb29fb75b5199bd5 (patch)
treed2033f6d6046024f603a68a7e06ad99ee0c56344 /adapters
parente4dcd8481197a791dad33d59e39d4129ed8eec59 (diff)
Use StringBuilder
Change-Id: I13d2856530776cdf57c41f12c0bf522988bea29a Issue-id: SO-224 Signed-off-by: Ramanjaneya-Huawei <ramanjaneya.palleti@huawei.com>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoException.java2
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java10
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();
}
}