Fix sonar issues in feature-state-management 93/29893/1
authorJim Hahn <jrh3@att.com>
Wed, 31 Jan 2018 22:49:08 +0000 (17:49 -0500)
committerJim Hahn <jrh3@att.com>
Wed, 31 Jan 2018 22:54:01 +0000 (17:54 -0500)
commit4401819b97be13c244dfe206256b59d13c89f7a6
tree8185d79ee850547cd7edc77bb30acb7ec509162d
parent9e2820c5820b3904e03cb7a4cb4292e864b1ca2b
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 <jrh3@att.com>
feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java
feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java
feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeature.java
feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java