aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common
diff options
context:
space:
mode:
authorBenjamin, Max <max.benjamin@att.com>2019-06-07 11:13:59 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-06-10 09:29:30 -0400
commit48b34de1fd7d68f41e868a25e8817346af6ef85a (patch)
tree664a85513dbe4a8e142caa658a4a887696d96311 /mso-api-handlers/mso-api-handler-common
parent242e71883f59b8ad971f77c9bbdf032527fd77c0 (diff)
replaced String.repeat with static final strings
replaced String.repeat with static final strings Change-Id: Ife14fde70e8f648881a03e9343ae8faf9cb87e2e Issue-ID: SO-1999 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java8
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/XMLValidator.java4
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java6
3 files changed, 9 insertions, 9 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
index eb4ba76530..ae443983b8 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
@@ -27,7 +27,7 @@ package org.onap.so.apihandler.common;
import java.io.IOException;
import java.util.UUID;
import javax.xml.bind.DatatypeConverter;
-import com.google.common.base.Strings;
+import org.onap.so.logger.LoggingAnchor;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
@@ -162,7 +162,7 @@ public class CamundaClient extends RequestClient {
jsonReq = mapper.writeValueAsString(camundaRequest);
logger.trace("request body is {}", jsonReq);
} catch (Exception e) {
- logger.error(Strings.repeat("{} ", 5), MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda", "wrapRequest",
+ logger.error(LoggingAnchor.FIVE, MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda", "wrapRequest",
ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
}
return jsonReq;
@@ -253,8 +253,8 @@ public class CamundaClient extends RequestClient {
jsonReq = mapper.writeValueAsString(camundaRequest);
logger.trace("request body is {}", jsonReq);
} catch (Exception e) {
- logger.error(Strings.repeat("{} ", 5), MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda",
- "wrapVIDRequest", ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
+ logger.error(LoggingAnchor.FIVE, MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda", "wrapVIDRequest",
+ ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
}
return jsonReq;
}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/XMLValidator.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/XMLValidator.java
index b9a06ac1d9..34077e6ad3 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/XMLValidator.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/XMLValidator.java
@@ -31,7 +31,7 @@ import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Validator;
-import com.google.common.base.Strings;
+import org.onap.so.logger.LoggingAnchor;
import org.apache.commons.io.IOUtils;
import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
@@ -95,7 +95,7 @@ public class XMLValidator {
return "ErrorDetails: " + e.getMessage();
} catch (Exception e) {
- logger.error(Strings.repeat("{} ", 3), MessageEnum.APIH_CANNOT_READ_SCHEMA.toString(),
+ logger.error(LoggingAnchor.THREE, MessageEnum.APIH_CANNOT_READ_SCHEMA.toString(),
ErrorCode.SchemaError.getValue(), "APIH cannot read schema file", e);
return "ErrorDetails: " + "Unable to read the schema file";
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
index 12379f9c1a..0d928cbb0c 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
@@ -36,7 +36,7 @@ import javax.ws.rs.ext.Provider;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
-import com.google.common.base.Strings;
+import org.onap.so.logger.LoggingAnchor;
import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo;
import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
@@ -135,8 +135,8 @@ public class ApiExceptionMapper implements ExceptionMapper<ApiException> {
} catch (JsonProcessingException | JAXBException e) {
String errorMsg =
"Exception in buildServiceErrorResponse writing exceptionType to string " + e.getMessage();
- logger.error(Strings.repeat("{} ", 4), MessageEnum.GENERAL_EXCEPTION.toString(),
- "BuildServiceErrorResponse", ErrorCode.DataError.getValue(), errorMsg, e);
+ logger.error(LoggingAnchor.FOUR, MessageEnum.GENERAL_EXCEPTION.toString(), "BuildServiceErrorResponse",
+ ErrorCode.DataError.getValue(), errorMsg, e);
return errorMsg;
}