diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-27 08:03:24 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-27 10:56:46 -0400 |
commit | 7da3ddfa40de2f683a2d423d62b78a8d001108eb (patch) | |
tree | 260fa9e903a3a6f2a60467bbeac500ad62d0e916 /integrity-audit/src/main/java | |
parent | dff3e8bb4ed367c05fb0425f03386994ed27d10a (diff) |
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 <pdragosh@research.att.com>
Diffstat (limited to 'integrity-audit/src/main/java')
-rw-r--r-- | integrity-audit/src/main/java/org/onap/policy/common/ia/DbAudit.java | 19 |
1 files changed, 6 insertions, 13 deletions
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<IntegrityAuditEntity> 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<Object, Object> myEntries, Map<Object, Object> 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 |