summaryrefslogtreecommitdiffstats
path: root/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-07-24 13:19:28 -0400
committerJim Hahn <jrh3@att.com>2019-07-24 15:45:15 -0400
commit7602a4380488d872b25cd718176b23369bf9e472 (patch)
tree4583c6bf1cee38301fd25d66cff940b09c3b8b15 /feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java
parentb08aaddaef7e3ca4248132365859a9a0da712148 (diff)
Add coverage to feature-active-standby-management
Also removed some logger.isXxx() tests, which should reduce the number of branches that need to be tested. Removed unneeded objects and methods from feature-lifecyle. Change-Id: Ic3eb9c0b63a2ad5585846525eb0ebda81fc55d5e Issue-ID: POLICY-1772 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java')
-rw-r--r--feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java20
1 files changed, 7 insertions, 13 deletions
diff --git a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java
index 5b1caeae..2be44458 100644
--- a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java
+++ b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java
@@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
* 'PolicyContainer' and 'Main'. It was moved here as part of making this
* a separate optional feature.
*/
-public class ActiveStandbyFeature implements ActiveStandbyFeatureApi,
+public class ActiveStandbyFeature implements ActiveStandbyFeatureApi,
PolicySessionFeatureApi, PolicyEngineFeatureApi {
// get an instance of logger
private static final Logger logger =
@@ -84,20 +84,16 @@ public class ActiveStandbyFeature implements ActiveStandbyFeatureApi,
for (StateManagementFeatureApi feature : StateManagementFeatureApi.impl.getList()) {
if (feature.getResourceName().equals(myPdp.getPdpId())) {
- if (logger.isDebugEnabled()) {
- logger.debug("ActiveStandbyFeature.globalInit: Found StateManagementFeature"
- + " with resourceName: {}", myPdp.getPdpId());
- }
+ logger.debug("ActiveStandbyFeature.globalInit: Found StateManagementFeature"
+ + " with resourceName: {}", myPdp.getPdpId());
stateManagementFeature = feature;
break;
}
}
if (stateManagementFeature == null) {
- if (logger.isDebugEnabled()) {
- logger.debug("ActiveStandbyFeature failed to initialize. "
- + "Unable to get instance of StateManagementFeatureApi "
- + "with resourceID: {}", myPdp.getPdpId());
- }
+ logger.debug("ActiveStandbyFeature failed to initialize. "
+ + "Unable to get instance of StateManagementFeatureApi "
+ + "with resourceID: {}", myPdp.getPdpId());
logger.error("ActiveStandbyFeature failed to initialize. "
+ "Unable to get instance of StateManagementFeatureApi "
+ "with resourceID: {}", myPdp.getPdpId());
@@ -114,9 +110,7 @@ public class ActiveStandbyFeature implements ActiveStandbyFeatureApi,
//Register the PMStandbyStateChangeNotifier Observer
stateManagementFeature.addObserver(pmNotifier);
- if (logger.isDebugEnabled()) {
- logger.debug("ActiveStandbyFeature.globalInit() exit");
- }
+ logger.debug("ActiveStandbyFeature.globalInit() exit");
}