From: Jim Hahn Date: Thu, 27 Jun 2019 22:15:45 +0000 (-0400) Subject: Allow empty DB password in IntegrityAudit X-Git-Tag: 1.5.1~18 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F90628%2F1;p=policy%2Fcommon.git Allow empty DB password in IntegrityAudit With the sonar fixes, IntegrityAudit is no longer allowing an empty DB password. This breaks some junits in other policy repos. Corrected the issue. Change-Id: I291d1592ffd80ee76dd9758b3b7156436c579dab Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn --- diff --git a/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java b/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java index 02e4c70b..61bf947e 100644 --- a/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java +++ b/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java @@ -152,8 +152,10 @@ public class IntegrityAudit { || parmsAreBad; parmsAreBad = checkEmpty(badparams, "dbUser", properties.getProperty(IntegrityAuditProperties.DB_USER)) || parmsAreBad; - parmsAreBad = checkEmpty(badparams, "dbPwd", properties.getProperty(IntegrityAuditProperties.DB_PWD)) - || parmsAreBad; + + // dbPwd may be empty + checkEmpty(badparams, "dbPwd", properties.getProperty(IntegrityAuditProperties.DB_PWD)); + parmsAreBad = checkEmpty(badparams, "siteName", properties.getProperty(IntegrityAuditProperties.SITE_NAME)) || parmsAreBad; parmsAreBad = checkNodeType(properties, badparams) || parmsAreBad;