Allow empty DB password in IntegrityAudit 28/90628/1
authorJim Hahn <jrh3@att.com>
Thu, 27 Jun 2019 22:15:45 +0000 (18:15 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 27 Jun 2019 22:17:10 +0000 (18:17 -0400)
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 <jrh3@att.com>
integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java

index 02e4c70..61bf947 100644 (file)
@@ -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;