From 27d388563cdc48a1fc19ca5ca99a0482e6834db5 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 10 Jul 2019 16:39:28 -0400 Subject: Fix checkstyle issues in policy-core Also deleted the checkstyle suppression file. Change-Id: I93e9f9154b614b56f7826ec978e1a99bd9369348 Issue-ID: POLICY-1907 Signed-off-by: Jim Hahn --- .../drools/activestandby/ActiveStandbyFeature.java | 4 +-- ...onap.policy.drools.core.PolicySessionFeatureAPI | 1 - ...onap.policy.drools.core.PolicySessionFeatureApi | 1 + .../drools/controller/test/AllSeemsWellTest.java | 8 +++--- .../test/StandbyStateManagementTest.java | 30 +++++++++++----------- 5 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI create mode 100644 feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureApi (limited to 'feature-active-standby-management') 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 f5f728f1..1872a3a9 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 @@ -29,7 +29,7 @@ import java.util.Properties; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; -import org.onap.policy.drools.core.PolicySessionFeatureAPI; +import org.onap.policy.drools.core.PolicySessionFeatureApi; import org.onap.policy.drools.features.PolicyEngineFeatureApi; import org.onap.policy.drools.statemanagement.StateManagementFeatureAPI; import org.onap.policy.drools.system.PolicyEngine; @@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory; * a separate optional feature. */ public class ActiveStandbyFeature implements ActiveStandbyFeatureAPI, - PolicySessionFeatureAPI, PolicyEngineFeatureApi { + PolicySessionFeatureApi, PolicyEngineFeatureApi { // get an instance of logger private static final Logger logger = LoggerFactory.getLogger(ActiveStandbyFeature.class); diff --git a/feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI b/feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI deleted file mode 100644 index 5296f8b7..00000000 --- a/feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureAPI +++ /dev/null @@ -1 +0,0 @@ -org.onap.policy.drools.activestandby.ActiveStandbyFeature diff --git a/feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureApi b/feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureApi new file mode 100644 index 00000000..5296f8b7 --- /dev/null +++ b/feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.core.PolicySessionFeatureApi @@ -0,0 +1 @@ +org.onap.policy.drools.activestandby.ActiveStandbyFeature 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 75a65f61..ea9418bf 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 @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-active-standby-management * ================================================================================ - * Copyright (C) 2017-2018 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. @@ -45,7 +45,7 @@ import org.onap.policy.drools.activestandby.DroolsPdpImpl; import org.onap.policy.drools.activestandby.DroolsPdpsConnector; import org.onap.policy.drools.activestandby.DroolsPdpsElectionHandler; import org.onap.policy.drools.activestandby.JpaDroolsPdpsConnector; -import org.onap.policy.drools.core.PolicySessionFeatureAPI; +import org.onap.policy.drools.core.PolicySessionFeatureApi; import org.onap.policy.drools.statemanagement.StateManagementFeatureAPI; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -236,7 +236,7 @@ public class AllSeemsWellTest { StateManagementFeatureAPI stateManagementFeatureApi = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); stateManagementFeatureApi = feature; logger.debug("testAllSeemsWell stateManagementFeature.getResourceName(): {}", stateManagementFeatureApi.getResourceName()); @@ -256,7 +256,7 @@ public class AllSeemsWellTest { // that has been created. ActiveStandbyFeatureAPI activeStandbyFeature = null; for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testAllSeemsWell activeStandbyFeature.getResourceName(): {}", 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 aca2021d..1a52456e 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 @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-active-standby-management * ================================================================================ - * Copyright (C) 2017-2018 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. @@ -52,7 +52,7 @@ import org.onap.policy.drools.activestandby.DroolsPdpsConnector; import org.onap.policy.drools.activestandby.DroolsPdpsElectionHandler; import org.onap.policy.drools.activestandby.JpaDroolsPdpsConnector; import org.onap.policy.drools.activestandby.PMStandbyStateChangeNotifier; -import org.onap.policy.drools.core.PolicySessionFeatureAPI; +import org.onap.policy.drools.core.PolicySessionFeatureApi; import org.onap.policy.drools.statemanagement.StateManagementFeatureAPI; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -353,7 +353,7 @@ public class StandbyStateManagementTest { StateManagementFeatureAPI stateManagementFeature = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); stateManagementFeature = feature; logger.debug("testColdStandby stateManagementFeature.getResourceName(): {}", stateManagementFeature.getResourceName()); @@ -472,7 +472,7 @@ public class StandbyStateManagementTest { StateManagementFeatureAPI stateManagementFeature = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); stateManagementFeature = feature; logger.debug("testComputeMostRecentPrimary stateManagementFeature.getResourceName(): {}", stateManagementFeature.getResourceName()); @@ -654,7 +654,7 @@ public class StandbyStateManagementTest { StateManagementFeatureAPI stateManagementFeature = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); stateManagementFeature = feature; logger.debug("testComputeDesignatedPdp stateManagementFeature.getResourceName(): {}", stateManagementFeature.getResourceName()); @@ -794,7 +794,7 @@ public class StandbyStateManagementTest { StateManagementFeatureAPI smf = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); smf = feature; logger.debug("testColdStandby stateManagementFeature.getResourceName(): {}", smf.getResourceName()); break; @@ -812,7 +812,7 @@ public class StandbyStateManagementTest { // that has been created. ActiveStandbyFeatureAPI activeStandbyFeature = null; for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testColdStandby activeStandbyFeature.getResourceName(): {}", activeStandbyFeature.getResourceName()); @@ -925,7 +925,7 @@ public class StandbyStateManagementTest { StateManagementFeatureAPI smf = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); smf = feature; logger.debug("testHotStandby1 stateManagementFeature.getResourceName(): {}", smf.getResourceName()); break; @@ -943,7 +943,7 @@ public class StandbyStateManagementTest { // that has been created. ActiveStandbyFeatureAPI activeStandbyFeature = null; for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testHotStandby1 activeStandbyFeature.getResourceName(): {}", activeStandbyFeature.getResourceName()); @@ -1082,7 +1082,7 @@ public class StandbyStateManagementTest { StateManagementFeatureAPI sm2 = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); sm2 = feature; logger.debug("testHotStandby2 stateManagementFeature.getResourceName(): {}", sm2.getResourceName()); break; @@ -1100,7 +1100,7 @@ public class StandbyStateManagementTest { // that has been created. ActiveStandbyFeatureAPI activeStandbyFeature = null; for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testHotStandby2 activeStandbyFeature.getResourceName(): {}", activeStandbyFeature.getResourceName()); @@ -1239,7 +1239,7 @@ public class StandbyStateManagementTest { StateManagementFeatureAPI sm = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); sm = feature; logger.debug("testLocking1 stateManagementFeature.getResourceName(): {}", sm.getResourceName()); break; @@ -1257,7 +1257,7 @@ public class StandbyStateManagementTest { // that has been created. ActiveStandbyFeatureAPI activeStandbyFeature = null; for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testLocking1 activeStandbyFeature.getResourceName(): {}", activeStandbyFeature.getResourceName()); @@ -1487,7 +1487,7 @@ public class StandbyStateManagementTest { StateManagementFeatureAPI sm = null; for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); sm = feature; logger.debug("testLocking2 stateManagementFeature.getResourceName(): {}", sm.getResourceName()); break; @@ -1505,7 +1505,7 @@ public class StandbyStateManagementTest { // that has been created. ActiveStandbyFeatureAPI activeStandbyFeature = null; for (ActiveStandbyFeatureAPI feature : ActiveStandbyFeatureAPI.impl.getList()) { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); + ((PolicySessionFeatureApi) feature).globalInit(null, configDir); activeStandbyFeature = feature; logger.debug("testLocking2 activeStandbyFeature.getResourceName(): {}", activeStandbyFeature.getResourceName()); -- cgit 1.2.3-korg