Fix more sonar issues in Integrity Audit & Monitor 76/90376/4
authorJim Hahn <jrh3@att.com>
Mon, 24 Jun 2019 12:41:18 +0000 (08:41 -0400)
committerJim Hahn <jrh3@att.com>
Mon, 24 Jun 2019 16:54:43 +0000 (12:54 -0400)
commitb52c7f21f7defaeaf86ff3921fe7bc18670ce2c1
tree2c658433bf5a26cfd05e95feb9994f197662e94b
parentd6aa3faba917b45e01f5001fe3a768feddedc798
Fix more sonar issues in Integrity Audit & Monitor

Removed duplicate code in DbDao by refactoring common code
into a new updateIae() method.
Removed duplicate code in IntegrityMonitor by refactoring common code
into a new withinTransaction() method.
Removed duplicate code in StateManagementEntity, StateElement by
replacing with lombok Getter & Setter annotations.
Removed duplicate code in StateManagement by refactoring common code
into new setState() and getState() methods.  Also removed
logger.isDebugEnabled() tests.
Added coverage for StateChangeNotifier.

Change-Id: I2e29b836dafc5de569a2267206a6a34105e44021
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
integrity-audit/src/main/java/org/onap/policy/common/ia/DbDao.java
integrity-monitor/pom.xml
integrity-monitor/src/main/java/org/onap/policy/common/im/IntegrityMonitor.java
integrity-monitor/src/main/java/org/onap/policy/common/im/StateElement.java
integrity-monitor/src/main/java/org/onap/policy/common/im/StateManagement.java
integrity-monitor/src/main/java/org/onap/policy/common/im/jpa/StateManagementEntity.java
integrity-monitor/src/test/java/org/onap/policy/common/im/StateChangeNotifierTest.java [new file with mode: 0644]