diff options
author | Jim Hahn <jrh3@att.com> | 2021-05-06 11:28:53 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-05-06 15:26:24 -0400 |
commit | 1d0aaaa5b31719c1718700bb0d1a99c413fd513c (patch) | |
tree | bd2687f1d38f3e3c4e53a68695c8c91c6866468e /integrity-audit/src/main/java/org/onap/policy/common/ia/DbAudit.java | |
parent | 3b00f1c32b89282dcbb74d3d3645e263f005319e (diff) |
Fix sonars in policy-common
Fixed sonars:
- use "var" instead of actual type name
- re-interrupt threads
- use rej2 split() instead of String split()
Issue-ID: POLICY-3285
Change-Id: I82261e0b8a53ee5c5264556fbf5cec37454f014e
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'integrity-audit/src/main/java/org/onap/policy/common/ia/DbAudit.java')
-rw-r--r-- | integrity-audit/src/main/java/org/onap/policy/common/ia/DbAudit.java | 12 |
1 files changed, 6 insertions, 6 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 f69173f8..c8ca41ca 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 @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * Integrity Audit * ================================================================================ - * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2021 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. @@ -123,7 +123,7 @@ public class DbAudit { * nodes. Since the audit is run in a round-robin, every instance will be compared against * every other instance. */ - IntegrityAuditEntity myIae = dbDao.getMyIntegrityAuditEntity(); + var myIae = dbDao.getMyIntegrityAuditEntity(); if (myIae == null) { @@ -267,7 +267,7 @@ public class DbAudit { * @return DAO properties for the given DB node */ private Properties getTheirDaoProperties(IntegrityAuditEntity iae) { - Properties theirProperties = new Properties(); + var theirProperties = new Properties(); theirProperties.put(IntegrityAuditProperties.DB_DRIVER, iae.getJdbcDriver()); theirProperties.put(IntegrityAuditProperties.DB_URL, iae.getJdbcUrl()); @@ -294,7 +294,7 @@ public class DbAudit { logger.debug("dbAudit: Second comparison; traversing classNameSet, size=" + classNameSet.size()); } - int errorCount = 0; + var errorCount = 0; for (String clazzName : classNameSet) { @@ -327,7 +327,7 @@ public class DbAudit { IntegrityAuditEntity myIae, String clazzName, Set<Object> keySet, Map<Object, Object> myEntries) throws IntegrityAuditException { - int errorCount = 0; + var errorCount = 0; for (IntegrityAuditEntity iae : iaeList) { if (iae.getId() == myIae.getId()) { if (logger.isDebugEnabled()) { @@ -363,7 +363,7 @@ public class DbAudit { return 0; } - StringBuilder keyBuilder = new StringBuilder(); + var keyBuilder = new StringBuilder(); for (Object key : misMatchedKeySet) { keyBuilder.append(key.toString()); keyBuilder.append(", "); |