diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-10-27 08:32:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-10-27 08:32:36 +0000 |
commit | c91753756d54b6cc0e4a6b48a6c9e012b3be8c56 (patch) | |
tree | 409e0041ef951104b4a78ae2c0b48d05c8e95ed6 /adapters/mso-sdnc-adapter/src/main/java/org | |
parent | 6175f2bd105fda0ad3b794c268aff47bdd88ce08 (diff) | |
parent | 803c1b6abe08930600c47c72d8449e836d5259a2 (diff) |
Merge "Iterate over the entrySet instead of keySet"
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.java | 7 |
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); } |