summaryrefslogtreecommitdiffstats
path: root/adapters/mso-sdnc-adapter/src/main
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-09-04 15:46:53 +0530
committerSandeep J <sandeejh@in.ibm.com>2018-09-04 15:46:59 +0530
commit09e5757ab7c964d33a15ee70305f9be735019bc7 (patch)
tree8e36f0c7dd4cdff83f248a0cda63bca3fa7ddb76 /adapters/mso-sdnc-adapter/src/main
parentb1c2cbe73420cbb62f643488422f174fe3311b1c (diff)
fixed sonar issue in SDNCServiceRequestConnector
fixed sonar issue as detailed in SO-970 Issue-ID: SO-970 Change-Id: I57c14693fa6918401d37d0d56bdccfe91bb2f372 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'adapters/mso-sdnc-adapter/src/main')
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
index 2fd39df4e9..8ca14501e5 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* Copyright (C) 2017 Huawei Technologies Co., Ltd. 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
@@ -149,7 +151,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
ackFinalIndicator = "Y";
}
- if (!ackFinalIndicator.equals("Y") && !"N".equals(ackFinalIndicator)) {
+ if (!"Y".equals(ackFinalIndicator) && !"N".equals(ackFinalIndicator)) {
throw new ParseException("Invalid ack-final-indicator in SDNC response: '" + ackFinalIndicator + "'", 0);
}
@@ -161,7 +163,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
// If the response code in the message from SDNC was not 2XX, return SDNCServiceError.
- if (!responseCode.matches("2[0-9][0-9]") && !responseCode.equals("0")) {
+ if (!responseCode.matches("2[0-9][0-9]") && !("0").equals(responseCode)) {
// Not a 2XX response. Return SDNCServiceError.
return new SDNCServiceError(svcRequestId, responseCode, responseMessage, ackFinalIndicator);
}