From 4401819b97be13c244dfe206256b59d13c89f7a6 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 31 Jan 2018 17:49:08 -0500 Subject: Fix sonar issues in feature-state-management DroolsPDPIntegrityMonitor.java: Modified init() to throw just IntegrityMonitorException. Modified DroolsPDPIntegrityMonitor init() method to throw specific types of exceptions. StateManagementFeature.java: Sonar complained about needing to merge "if" statements, but chose to eliminate the "if(logger.isDebugEnabled())" instead - did this through-out the source file. Removed extra runtime exception from "throws" declaration. DbAudit.java: Fixed sonar issue regarding setting a static variable from within a non-static method. Removed logger.isDebugEnabled() tests where method calls are not involed. Simplified invoke() method complexity as reported by sonar. DroolsPDPIntegrityMonitor.java: Reduced init() complexity reported by sonar. Change-Id: Ib2722b21bbf3aad130af46c8790f40d8777e36be Issue-ID: POLICY-469 Signed-off-by: Jim Hahn --- .../org/onap/policy/drools/statemanagement/test/StateManagementTest.java | 1 + 1 file changed, 1 insertion(+) (limited to 'feature-state-management/src/test') diff --git a/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java b/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java index 85e0ed85..b364ef83 100644 --- a/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java +++ b/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java @@ -185,6 +185,7 @@ public class StateManagementTest { /**************Repository Audit Test**************/ logger.debug("\n\ntestStateManagementOperation: Repository Audit\n\n"); try{ + StateManagementProperties.initProperties(fsmProperties); RepositoryAudit repositoryAudit = (RepositoryAudit) RepositoryAudit.getInstance(); repositoryAudit.invoke(fsmProperties); -- cgit 1.2.3-korg