From 7da3ddfa40de2f683a2d423d62b78a8d001108eb Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 27 Mar 2020 08:03:24 -0400 Subject: More sonar issues cleanup Either log or rethrow Use boolean expression Add at least one test Remove commented out code Issue-ID: POLICY-2204 Change-Id: I4fdf31aea75303e4f49d25198eb3b12341995bfe Signed-off-by: Pamela Dragosh --- .../main/java/org/onap/policy/common/ia/DbAudit.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'integrity-audit/src/main/java') diff --git a/integrity-audit/src/main/java/org/onap/policy/common/ia/DbAudit.java b/integrity-audit/src/main/java/org/onap/policy/common/ia/DbAudit.java index 4e718a60..a7b7fd89 100644 --- a/integrity-audit/src/main/java/org/onap/policy/common/ia/DbAudit.java +++ b/integrity-audit/src/main/java/org/onap/policy/common/ia/DbAudit.java @@ -1,8 +1,8 @@ -/* +/*-- * ============LICENSE_START======================================================= * Integrity Audit * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,16 +60,11 @@ public class DbAudit { */ public DbAudit(DbDao dbDao) { - if (logger.isDebugEnabled()) { - logger.debug("Constructor: Entering"); - } + logger.debug("Constructor: Entering"); this.dbDao = dbDao; - if (logger.isDebugEnabled()) { - logger.debug("Constructor: Exiting"); - } - + logger.debug("Constructor: Exiting"); } /** @@ -153,8 +148,6 @@ public class DbAudit { if (logger.isDebugEnabled()) { logger.debug("dbAudit: Exiting"); } - - return; // all done } private void compareList(String persistenceUnit, List iaeList, IntegrityAuditEntity myIae, @@ -246,7 +239,7 @@ public class DbAudit { * again for all nodes later. */ compareMineWithTheirs(myEntries, theirEntries, clazzName, misMatchedMap); - } // end for (IntegrityAuditEntity iae : iaeList) + } } private void compareMineWithTheirs(Map myEntries, Map theirEntries, @@ -332,7 +325,7 @@ public class DbAudit { logger.debug("dbAudit: Second comparison; waking from sleep"); } } - } // end: for(String clazzName: classNameList) + } if (errorCount != 0) { String msg = " DB Audit: " + errorCount -- cgit 1.2.3-korg