Fix checkstyle issues in api-active-standby-management 84/91184/3
authorJim Hahn <jrh3@att.com>
Wed, 10 Jul 2019 19:42:40 +0000 (15:42 -0400)
committerJim Hahn <jrh3@att.com>
Wed, 17 Jul 2019 12:53:11 +0000 (08:53 -0400)
Also deleted the checkstyle suppression file.

Change-Id: I3518f29c75061dced8f507b274388f7588859037
Issue-ID: POLICY-1901
Signed-off-by: Jim Hahn <jrh3@att.com>
api-active-standby-management/checkstyle-suppressions.xml [deleted file]
api-active-standby-management/pom.xml
api-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeatureApi.java [moved from api-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeatureAPI.java with 91% similarity]
feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java
feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.activestandby.ActiveStandbyFeatureApi [moved from feature-active-standby-management/src/main/resources/META-INF/services/org.onap.policy.drools.activestandby.ActiveStandbyFeatureAPI with 100% similarity]
feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java
feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java

diff --git a/api-active-standby-management/checkstyle-suppressions.xml b/api-active-standby-management/checkstyle-suppressions.xml
deleted file mode 100644 (file)
index b6fa7ef..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  ============LICENSE_START=======================================================
-   Copyright (C) 2018 AT&T Technologies. 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.
-  You may obtain a copy of the License at
-  
-       http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  
-  SPDX-License-Identifier: Apache-2.0
-  ============LICENSE_END=========================================================
--->
-
-<!DOCTYPE suppressions PUBLIC
-     "-//Puppy Crawl//DTD Suppressions 1.0//EN"
-     "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-<suppressions>
-  <suppress checks="AbbreviationAsWordInName"
-    files="ActiveStandbyFeatureAPI.java"
-    lines="1-9999"/>
-</suppressions>
index 0d6861b..9182c5a 100644 (file)
@@ -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 @@
                             <includeTestResources>true</includeTestResources>
                             <excludes>
                             </excludes>
-                            <suppressionsLocation>${project.baseUri}checkstyle-suppressions.xml</suppressionsLocation>
                             <consoleOutput>true</consoleOutput>
                             <failsOnViolation>true</failsOnViolation>
                             <violationSeverity>warning</violationSeverity>
@@ -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<ActiveStandbyFeatureAPI> impl =
-            new OrderedServiceImpl<>(ActiveStandbyFeatureAPI.class);
+    public static OrderedServiceImpl<ActiveStandbyFeatureApi> impl =
+            new OrderedServiceImpl<>(ActiveStandbyFeatureApi.class);
 
     /**
      * Returns the resourceName (PDP ID) for the Drools-PDP that is
index 1872a3a..c34f9ac 100644 (file)
@@ -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 =
index ea9418b..0c04e3d 100644 (file)
@@ -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(): {}",
index 1a52456..ac4269a 100644 (file)
@@ -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(): {}",