summaryrefslogtreecommitdiffstats
path: root/feature-state-management
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-06-19 14:32:10 -0400
committerJim Hahn <jrh3@att.com>2020-06-19 15:44:28 -0400
commit56a15039437ba5bf5d0fb422551bfb12e1f59eb1 (patch)
tree1fc57df4d9462790d4c4dd811425ab029d8ec710 /feature-state-management
parent1d810e0be1188c07ec9292b348c9d286f36963d9 (diff)
Address checkstyle version issues in drools-pdp
Also added serializationId to several classes to address eclipse warnings. Issue-ID: POLICY-2188 Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-state-management')
-rw-r--r--feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java3
-rw-r--r--feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/IntegrityMonitorRestManager.java2
-rw-r--r--feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeature.java3
-rw-r--r--feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java9
-rw-r--r--feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/Audit.java5
-rw-r--r--feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java12
6 files changed, 13 insertions, 21 deletions
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java
index b34d64e6..2dc751b1 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DbAudit.java
@@ -27,7 +27,6 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
import java.util.UUID;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -64,7 +63,7 @@ public class DbAudit extends DroolsPdpIntegrityMonitor.AuditBase {
/**
* Get the instance.
- *
+ *
* @return the single 'DbAudit' instance. */
public static DroolsPdpIntegrityMonitor.AuditBase getInstance() {
return instance;
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/IntegrityMonitorRestManager.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/IntegrityMonitorRestManager.java
index 3330bd80..459d3836 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/IntegrityMonitorRestManager.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/IntegrityMonitorRestManager.java
@@ -24,11 +24,9 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
-
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeature.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeature.java
index 520d8503..75233376 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeature.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementFeature.java
@@ -76,8 +76,7 @@ public class StateManagementFeature implements StateManagementFeatureApi,
if (stateManagement == null) {
logger.debug("StateManagementFeature.globalInit(): stateManagement is NULL!");
- }
- else {
+ } else {
logger.debug("StateManagementFeature.globalInit(): "
+ "stateManagement.getAdminState(): {}", stateManagement.getAdminState());
}
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java
index c4d38817..d7f15883 100644
--- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java
+++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java
@@ -7,9 +7,9 @@
* 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.
@@ -21,7 +21,6 @@
package org.onap.policy.drools.statemanagement;
import java.util.Properties;
-
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -68,13 +67,13 @@ public class StateManagementProperties {
/**
* Initialize the parameter values from the feature-state-management.properties file values.
- *
+ *
* <p>This is designed so that the Properties object is obtained from the
* feature-state-management.properties file and then is passed to this method to initialize the
* value of the parameters. This allows the flexibility of JUnit tests using
* getProperties(filename) to get the properties while runtime methods can use
* getPropertiesFromClassPath(filename).
- *
+ *
* @param prop properties
*/
public static void initProperties(Properties prop) {
diff --git a/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/Audit.java b/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/Audit.java
index 943293c9..37d9d7b8 100644
--- a/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/Audit.java
+++ b/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/Audit.java
@@ -7,9 +7,9 @@
* 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.
@@ -21,7 +21,6 @@
package org.onap.policy.drools.statemanagement.test;
import java.io.Serializable;
-
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
diff --git a/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java b/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java
index f6c42b5f..347e8c90 100644
--- a/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java
+++ b/feature-state-management/src/test/java/org/onap/policy/drools/statemanagement/test/StateManagementTest.java
@@ -26,13 +26,11 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
-
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;
import javax.ws.rs.core.Response;
-
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
@@ -74,7 +72,7 @@ public class StateManagementTest {
String userDir = System.getProperty("user.dir");
logger.debug("setUpClass: userDir=" + userDir);
System.setProperty("com.sun.management.jmxremote.port", "9980");
- System.setProperty("com.sun.management.jmxremote.authenticate","false");
+ System.setProperty("com.sun.management.jmxremote.authenticate", "false");
initializeDb();
@@ -189,7 +187,7 @@ public class StateManagementTest {
assertTrue("Standby status not coldstandby after promote()", standby.equals(StateManagement.COLD_STANDBY));
- /**************Repository Audit Test. **************/
+ /* *************Repository Audit Test. ************* */
logger.debug("\n\ntestStateManagementOperation: Repository Audit\n\n");
try {
StateManagementProperties.initProperties(fsmProperties);
@@ -207,7 +205,7 @@ public class StateManagementTest {
logger.debug("testSubsytemTest RepositoryAudit InterruptedException", e);
}
- /*****************Db Audit Test. ***************/
+ /* ****************Db Audit Test. ************** */
logger.debug("\n\ntestStateManagementOperation: DB Audit\n\n");
try {
@@ -220,7 +218,7 @@ public class StateManagementTest {
logger.debug("testSubsytemTest DbAudit exception", e);
}
- /*************IntegrityMonitorRestManager Test. *************/
+ /* ************IntegrityMonitorRestManager Test. ************ */
logger.debug("\n\ntestStateManagementOperation: IntegrityMonitorRestManager\n\n");
IntegrityMonitorRestManager integrityMonitorRestManager = new IntegrityMonitorRestManager();
@@ -242,7 +240,7 @@ public class StateManagementTest {
logger.debug("initializeDb: Entering");
Properties cleanProperties = new Properties();
- cleanProperties.put(StateManagementProperties.DB_DRIVER,"org.h2.Driver");
+ cleanProperties.put(StateManagementProperties.DB_DRIVER, "org.h2.Driver");
cleanProperties.put(StateManagementProperties.DB_URL, "jdbc:h2:mem:statemanagement");
cleanProperties.put(StateManagementProperties.DB_USER, "sa");
cleanProperties.put(StateManagementProperties.DB_PWD, "");