diff options
author | Modaboina, Kusumakumari (km583p) <km583p@us.att.com> | 2018-04-02 17:25:57 -0400 |
---|---|---|
committer | Takamune Cho <tc012c@att.com> | 2018-04-03 14:00:26 +0000 |
commit | 8c86b5b342849636ab047345f524d89a2d3effab (patch) | |
tree | 54372ea68221adcf19294c4715651c09be9c0099 /appc-config/appc-encryption-tool/provider/src/main/java | |
parent | a90120e1516f3c4b8a1ea1a1f66c7acdac05f4c1 (diff) |
modifying improper conditions to update properties
Change-Id: I51b2c7755ffe5841fe3f87439ccb35b1e37765fa
Issue-ID: APPC-821
Signed-off-by: Modaboina, Kusumakumari (km583p) <km583p@us.att.com>
Diffstat (limited to 'appc-config/appc-encryption-tool/provider/src/main/java')
-rw-r--r-- | appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java b/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java index 2fc2df6db..6091e4cf2 100644 --- a/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java +++ b/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP : APPC * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= @@ -18,7 +18,6 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. * ============LICENSE_END========================================================= */ @@ -50,15 +49,15 @@ public class WrapperEncryptionTool { String port = args[5]; String url = args[6]; - if (StringUtils.isNotBlank(user)) { + if (StringUtils.isBlank(user)) { log.info("ERROR-USER can not be null"); return; } - if (StringUtils.isNotBlank(password)) { + if (StringUtils.isBlank(password)) { log.info("ERROR-PASSWORD can not be null"); return; } - if (StringUtils.isNotBlank(protocol) || StringUtils.isNotBlank(vnfType) || StringUtils.isNotBlank(action)) { + if (StringUtils.isBlank(protocol) || StringUtils.isBlank(vnfType) || StringUtils.isBlank(action)) { log.info("ERROR-PROTOCOL ,Action and VNF-TYPE both can not be null"); return; } @@ -66,7 +65,7 @@ public class WrapperEncryptionTool { EncryptionTool et = EncryptionTool.getInstance(); String enPass = et.encrypt(password); - if (StringUtils.isNotBlank(protocol)) { + if (StringUtils.isBlank(protocol)) { updateProperties(user, vnfType, enPass, action, port, url, protocol); } } @@ -77,13 +76,13 @@ public class WrapperEncryptionTool { log.info("Received Inputs protocol:%s User:%s vnfType:%s action:%surl:%s port:%s ", protocol, user, vnfType, action, url, port); String property = protocol; - if (StringUtils.isBlank(vnfType)) { - if (StringUtils.isBlank(protocol) && StringUtils.isBlank(action)) { + if (StringUtils.isNotBlank(vnfType)) { + if (StringUtils.isNotBlank(protocol) && StringUtils.isNotBlank(action)) { property = vnfType + "." + protocol + "." + action; } else if (StringUtils.isNotBlank(protocol)){ property = vnfType; } - } else if (StringUtils.isBlank(protocol)){ + } else if (StringUtils.isNotBlank(protocol)){ property = protocol; } |