summaryrefslogtreecommitdiffstats
path: root/adapters/mso-sdnc-adapter
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-sdnc-adapter')
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java8
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java8
2 files changed, 8 insertions, 8 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java
index 97f30bea6b..45d5944c7d 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java
@@ -197,7 +197,7 @@ public class SDNCRestClient implements Runnable {
//default
sdncResp.setRespCode(HttpURLConnection.HTTP_INTERNAL_ERROR);
String respMsg = "Error processing request to SDNC. ";
- String sdncErrMsg = "";
+ StringBuilder sdncErrMsg = new StringBuilder();
if (e instanceof java.net.SocketTimeoutException )
{
@@ -229,7 +229,7 @@ public class SDNCRestClient implements Runnable {
String eType = null;
try {
eType = xpath.evaluate("error-type", error);
- sdncErrMsg = ". SDNC Returned-[error-type:" + eType;
+ sdncErrMsg = new StringBuilder(". SDNC Returned-[error-type:" + eType);
} catch (Exception e3) {
msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-type", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
}
@@ -237,7 +237,7 @@ public class SDNCRestClient implements Runnable {
String eTag = null;
try {
eTag = xpath.evaluate( "error-tag", error);
- sdncErrMsg = sdncErrMsg + ", error-tag:" + eTag;
+ sdncErrMsg.append(", error-tag:").append(eTag);
} catch (Exception e3) {
msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-tag", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
}
@@ -245,7 +245,7 @@ public class SDNCRestClient implements Runnable {
String eMsg = null;
try {
eMsg = xpath.evaluate("error-message", error);
- sdncErrMsg = sdncErrMsg + ", error-message:" + eMsg + "]";
+ sdncErrMsg.append(", error-message:").append(eMsg).append("]");
} catch (Exception e3) {
msoLogger.error (MessageEnum.RA_EVALUATE_XPATH_ERROR, "error-message", error.toString(), "SDNC", "", MsoLogger.ErrorCode.DataError, "Exception while evaluate xpath", e3);
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
index 262d23bd09..be0466af73 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
@@ -257,7 +257,7 @@ public abstract class SDNCConnector {
// </error>
// </errors>
- String output = null;
+ StringBuilder output = null;
try {
XPathFactory xpathFactory = XPathFactory.newInstance();
@@ -306,9 +306,9 @@ public abstract class SDNCConnector {
if (!info.isEmpty()) {
if (output == null) {
- output = "[" + info + "]";
+ output = new StringBuilder("[" + info + "]");
} else {
- output += " [" + info + "]";
+ output.append(" [").append(info).append("]");
}
}
}
@@ -317,6 +317,6 @@ public abstract class SDNCConnector {
MsoLogger.ErrorCode.DataError, "Exception while analyzing errors", e);
}
- return output;
+ return output.toString();
}
}