summaryrefslogtreecommitdiffstats
path: root/adapters/mso-sdnc-adapter/src/main/java/org
diff options
context:
space:
mode:
authorrama-huawei <rama.subba.reddy.s@huawei.com>2017-10-17 15:44:36 +0530
committerRama SubbaReddy <rama.subba.reddy.s@huawei.com>2017-10-23 06:29:42 +0000
commit803c1b6abe08930600c47c72d8449e836d5259a2 (patch)
treedcab1959c4bedcb963184b43d74108ee286b3710 /adapters/mso-sdnc-adapter/src/main/java/org
parent913ca71caf1fee02247b4ddfa589d551f1dda05a (diff)
Iterate over the entrySet instead of keySet
Issue-id: SO-214 Change-Id: I3f417fee04ae1fe2c1d0b7361ec0272e1b098302 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'adapters/mso-sdnc-adapter/src/main/java/org')
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
index f0fcf18afd..ab2c4eff2c 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
@@ -43,6 +43,7 @@ import org.openecomp.mso.logger.MsoLogger;
public class SDNCServiceRequestConnector extends SDNCConnector {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+ private static final String YES = "Y";
@Override
protected SDNCResponseCommon createResponseFromContent(int statusCode, String statusMessage,
String responseContent, TypedRequestTunables rt) {
@@ -57,7 +58,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
@Override
protected SDNCErrorCommon createErrorResponse(int statusCode, String errMsg,
TypedRequestTunables rt) {
- return new SDNCServiceError(rt.getReqId(), String.valueOf(statusCode), errMsg, "Y");
+ return new SDNCServiceError(rt.getReqId(), String.valueOf(statusCode), errMsg, YES);
}
/**
@@ -133,10 +134,10 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
// ack-final-indicator is optional: default to "Y".
if (ackFinalIndicator == null || ackFinalIndicator.trim().isEmpty()) {
- ackFinalIndicator = "Y";
+ ackFinalIndicator = YES;
}
- if (!ackFinalIndicator.equals("Y") && !"N".equals(ackFinalIndicator)) {
+ if (!YES.equals(ackFinalIndicator) && !"N".equals(ackFinalIndicator)) {
throw new ParseException("Invalid ack-final-indicator in SDNC response: '" + ackFinalIndicator + "'", 0);
}