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 --- .../java/org/onap/policy/common/im/IntegrityMonitor.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java') diff --git a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java index 1372b4fc..d96aa44a 100644 --- a/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java +++ b/integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java @@ -925,7 +925,7 @@ public class IntegrityMonitor { } // check the next group - } // end for (String group : depGroups) + } return dependencyOk; } @@ -963,7 +963,7 @@ public class IntegrityMonitor { appendSeparator(errorMsg); errorMsg.append(failMsg); } - } // end for (String dep : dependencies) + } // if all dependencies in a group are failed, set this // resource's state to disable dependency @@ -1206,7 +1206,7 @@ public class IntegrityMonitor { } catch (Exception e1) { logger.error(EXCEPTION_STRING, e1); } - logger.error("writeFpc DB table commit failed with exception", e); + logger.error("writeFpc DB table commit failed with exception"); throw e; } } @@ -1500,8 +1500,8 @@ public class IntegrityMonitor { if (sme != null && !sme.getOpState().equals(StateManagement.DISABLED)) { disableFailed(sme); } - } // end if(diffMs > staleMs) - } // end for(ForwardProgressEntity fpe : fpList) + } + } logger.debug("IntegrityMonitor.executeStateAudit(): exit"); } @@ -1817,7 +1817,7 @@ public class IntegrityMonitor { allNotWellMap = new HashMap<>(); } - if (asw) { + if (Boolean.TRUE.equals(asw)) { logger.info("allSeemsWell: ALL SEEMS WELL: key = {}, msg = {}", key, msg); allSeemsWellMap.put(key, msg); allNotWellMap.remove(key); -- cgit 1.2.3-korg