aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-08-27 02:54:34 +0530
committerRob Daugherty <rd472p@att.com>2018-08-27 14:22:30 +0000
commitfe2c0d11986a49aed5cb578f5aea227e4d34b1de (patch)
tree50db4905e6d30f54bd6ffb9b3e1a52571389d0d4 /adapters
parentd5f463c2faf2bd62c81379ab65d0eead5c95df0c (diff)
fixed sonar issues in MsoRequestsDbAdapterImpl
fixed sonar issue: Define a constant instead of duplicating literal 3 times. Issue-ID: SO-913 Change-Id: I12e2d60d9841cf3600ac7e4c822027c9af19c3b6 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index 2f6a5839b7..d0eae88c9e 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -51,6 +53,8 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
private static final String SUCCESSFUL = "Successful";
private static final String GET_INFRA_REQUEST = "Get Infra request";
+
+ private static final String ERROR = "Error ";
private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, MsoRequestsDbAdapterImpl.class);
@@ -131,7 +135,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
} catch (Exception e) {
String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId;
- logger.error("Error " + MsoLogger.ErrorCode.BusinessProcesssError + " for " + GET_INFRA_REQUEST + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e);
+ logger.error(ERROR + MsoLogger.ErrorCode.BusinessProcesssError + " for " + GET_INFRA_REQUEST + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e);
logger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error);
throw new MsoRequestsDbException(error, e);
}
@@ -165,7 +169,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
}
} catch (Exception e) {
String error = "Error retrieving MSO Infra Requests DB for Request ID " + requestId;
- logger.error("Error " + MsoLogger.ErrorCode.BusinessProcesssError + " for " + GET_INFRA_REQUEST + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e);
+ logger.error(ERROR + MsoLogger.ErrorCode.BusinessProcesssError + " for " + GET_INFRA_REQUEST + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e);
logger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error);
throw new MsoRequestsDbException(error, e);
}
@@ -223,7 +227,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
String error = "Entity not found. Unable to retrieve OperationStatus Object ServiceId: " + serviceId + " operationId: "
+ operationId;
MsoRequestsDbException e = new MsoRequestsDbException(error);
- logger.error("Error "+ MsoLogger.ErrorCode.BusinessProcesssError + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e);
+ logger.error(ERROR+ MsoLogger.ErrorCode.BusinessProcesssError + " - " + MessageEnum.RA_DB_REQUEST_NOT_EXIST + " - " + error, e);
throw e;
}