From: Jim Hahn Date: Wed, 10 Jul 2019 19:42:40 +0000 (-0400) Subject: Fix checkstyle issues in api-active-standby-management X-Git-Tag: 1.5.1~13 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=6dee9fba7e3c471bab358d8567a9e3e0a3fca769;p=policy%2Fdrools-pdp.git Fix checkstyle issues in api-active-standby-management Also deleted the checkstyle suppression file. Change-Id: I3518f29c75061dced8f507b274388f7588859037 Issue-ID: POLICY-1901 Signed-off-by: Jim Hahn --- diff --git a/api-active-standby-management/checkstyle-suppressions.xml b/api-active-standby-management/checkstyle-suppressions.xml deleted file mode 100644 index b6fa7eff..00000000 --- a/api-active-standby-management/checkstyle-suppressions.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - diff --git a/api-active-standby-management/pom.xml b/api-active-standby-management/pom.xml index 0d6861bd..9182c5a8 100644 --- a/api-active-standby-management/pom.xml +++ b/api-active-standby-management/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ECOMP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -69,7 +69,6 @@ true - ${project.baseUri}checkstyle-suppressions.xml true true warning diff --git a/api-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeatureAPI.java b/api-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeatureApi.java similarity index 91% rename from api-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeatureAPI.java rename to api-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeatureApi.java index 5f99e6bb..8637fa5c 100644 --- a/api-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeatureAPI.java +++ b/api-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeatureApi.java @@ -28,13 +28,13 @@ import org.onap.policy.common.utils.services.OrderedServiceImpl; * appropriate points in the application, the code iterates through this list, invoking these * optional methods. */ -public interface ActiveStandbyFeatureAPI extends OrderedService { +public interface ActiveStandbyFeatureApi extends OrderedService { /** * 'FeatureAPI.impl.getList()' returns an ordered list of objects implementing the 'FeatureAPI' * interface. */ - public static OrderedServiceImpl impl = - new OrderedServiceImpl<>(ActiveStandbyFeatureAPI.class); + public static OrderedServiceImpl impl = + new OrderedServiceImpl<>(ActiveStandbyFeatureApi.class); /** * Returns the resourceName (PDP ID) for the Drools-PDP that is 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 1872a3a9..c34f9ace 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 = diff --git a/feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.activestandby.ActiveStandbyFeatureAPI b/feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.activestandby.ActiveStandbyFeatureApi similarity index 100% rename from feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.activestandby.ActiveStandbyFeatureAPI rename to feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.activestandby.ActiveStandbyFeatureApi diff --git a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java index ea9418bf..0c04e3d9 100644 --- a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java +++ b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java @@ -38,7 +38,7 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.onap.policy.common.im.StateManagement; -import org.onap.policy.drools.activestandby.ActiveStandbyFeatureAPI; +import org.onap.policy.drools.activestandby.ActiveStandbyFeatureApi; import org.onap.policy.drools.activestandby.ActiveStandbyProperties; import org.onap.policy.drools.activestandby.DroolsPdpEntity; import org.onap.policy.drools.activestandby.DroolsPdpImpl; @@ -254,8 +254,8 @@ public class AllSeemsWellTest { // Create an ActiveStandbyFeature and initialize it. It will discover the StateManagementFeature // that has been created. - ActiveStandbyFeatureAPI activeStandbyFeature = null; - for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { + ActiveStandbyFeatureApi activeStandbyFeature = null; + for (ActiveStandbyFeatureApi feature : ActiveStandbyFeatureApi.impl.getList()) { ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testAllSeemsWell activeStandbyFeature.getResourceName(): {}", diff --git a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java index 1a52456e..ac4269a9 100644 --- a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java +++ b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java @@ -43,7 +43,7 @@ import org.onap.policy.common.im.AdministrativeStateException; import org.onap.policy.common.im.IntegrityMonitor; import org.onap.policy.common.im.StandbyStatusException; import org.onap.policy.common.im.StateManagement; -import org.onap.policy.drools.activestandby.ActiveStandbyFeatureAPI; +import org.onap.policy.drools.activestandby.ActiveStandbyFeatureApi; import org.onap.policy.drools.activestandby.ActiveStandbyProperties; import org.onap.policy.drools.activestandby.DroolsPdp; import org.onap.policy.drools.activestandby.DroolsPdpEntity; @@ -810,8 +810,8 @@ public class StandbyStateManagementTest { // Create an ActiveStandbyFeature and initialize it. It will discover the StateManagementFeature // that has been created. - ActiveStandbyFeatureAPI activeStandbyFeature = null; - for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { + ActiveStandbyFeatureApi activeStandbyFeature = null; + for (ActiveStandbyFeatureApi feature : ActiveStandbyFeatureApi.impl.getList()) { ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testColdStandby activeStandbyFeature.getResourceName(): {}", @@ -941,8 +941,8 @@ public class StandbyStateManagementTest { // Create an ActiveStandbyFeature and initialize it. It will discover the StateManagementFeature // that has been created. - ActiveStandbyFeatureAPI activeStandbyFeature = null; - for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { + ActiveStandbyFeatureApi activeStandbyFeature = null; + for (ActiveStandbyFeatureApi feature : ActiveStandbyFeatureApi.impl.getList()) { ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testHotStandby1 activeStandbyFeature.getResourceName(): {}", @@ -1098,8 +1098,8 @@ public class StandbyStateManagementTest { // Create an ActiveStandbyFeature and initialize it. It will discover the StateManagementFeature // that has been created. - ActiveStandbyFeatureAPI activeStandbyFeature = null; - for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { + ActiveStandbyFeatureApi activeStandbyFeature = null; + for (ActiveStandbyFeatureApi feature : ActiveStandbyFeatureApi.impl.getList()) { ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testHotStandby2 activeStandbyFeature.getResourceName(): {}", @@ -1255,8 +1255,8 @@ public class StandbyStateManagementTest { // Create an ActiveStandbyFeature and initialize it. It will discover the StateManagementFeature // that has been created. - ActiveStandbyFeatureAPI activeStandbyFeature = null; - for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { + ActiveStandbyFeatureApi activeStandbyFeature = null; + for (ActiveStandbyFeatureApi feature : ActiveStandbyFeatureApi.impl.getList()) { ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testLocking1 activeStandbyFeature.getResourceName(): {}", @@ -1503,8 +1503,8 @@ public class StandbyStateManagementTest { // Create an ActiveStandbyFeature and initialize it. It will discover the StateManagementFeature // that has been created. - ActiveStandbyFeatureAPI activeStandbyFeature = null; - for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { + ActiveStandbyFeatureApi activeStandbyFeature = null; + for (ActiveStandbyFeatureApi feature : ActiveStandbyFeatureApi.impl.getList()) { ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testLocking2 activeStandbyFeature.getResourceName(): {}",