summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-09-25 09:20:32 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-09-25 11:03:11 -0400
commit8218ae0be874fe0a662f52ac74cd43f564e7b666 (patch)
tree5c1603e6d16af60b4280e25deff759b2a02fb77f /main
parentda9e01a78e3205ee7238196a574adcf11c041797 (diff)
Clean up checkstyle declaration
Fixed the path for finding the src files. Added eclipse lifecycle to ignore the oparent checkstyle bug. Cleaned up existing checkstyle issues. Added entries into .gitignore to ignore debug logging directories created. Issue-ID: POLICY-1136 Change-Id: I684038babcb9723cfc4bef2b2a713425ae077599 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterGroup.java2
-rw-r--r--main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterHandler.java7
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java3
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/ApiRestServer.java19
-rw-r--r--main/src/main/java/org/onap/policy/api/main/rest/HealthCheckProvider.java2
-rw-r--r--main/src/main/java/org/onap/policy/api/main/startstop/ApiActivator.java5
-rw-r--r--main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java12
-rw-r--r--main/src/main/java/org/onap/policy/api/main/startstop/Main.java7
-rw-r--r--main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java1
9 files changed, 26 insertions, 32 deletions
diff --git a/main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterGroup.java b/main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterGroup.java
index 1b149d03..af12f016 100644
--- a/main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterGroup.java
+++ b/main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterGroup.java
@@ -60,7 +60,7 @@ public class ApiParameterGroup implements ParameterGroup {
*/
@Override
public void setName(String name) {
- this.name=name;
+ this.name = name;
}
/**
diff --git a/main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterHandler.java b/main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterHandler.java
index 4cee10a1..92923d0d 100644
--- a/main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterHandler.java
+++ b/main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterHandler.java
@@ -22,13 +22,12 @@ package org.onap.policy.api.main.parameters;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
+import java.io.FileReader;
+import org.onap.policy.api.main.PolicyApiException;
+import org.onap.policy.api.main.startstop.ApiCommandLineArguments;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.common.parameters.GroupValidationResult;
-import org.onap.policy.api.main.PolicyApiException;
-import org.onap.policy.api.main.startstop.ApiCommandLineArguments;
-
-import java.io.FileReader;
/**
* This class handles reading, parsing and validating of policy api parameters from JSON files.
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java b/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
index 1dd01a32..9b4d75df 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/ApiRestController.java
@@ -25,13 +25,12 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Info;
import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
-
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.onap.policy.common.endpoints.report.HealthCheckReport;
/**
* Class to provide api REST services.
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/ApiRestServer.java b/main/src/main/java/org/onap/policy/api/main/rest/ApiRestServer.java
index 1050dbf6..b6d69602 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/ApiRestServer.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/ApiRestServer.java
@@ -20,15 +20,14 @@
package org.onap.policy.api.main.rest;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import org.onap.policy.api.main.parameters.RestServerParameters;
import org.onap.policy.common.capabilities.Startable;
import org.onap.policy.common.endpoints.http.server.HttpServletServer;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
-import org.onap.policy.api.main.parameters.RestServerParameters;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
/**
* Class to manage life cycle of api rest server.
@@ -54,7 +53,7 @@ public class ApiRestServer implements Startable {
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}.
*/
@Override
public boolean start() {
@@ -94,7 +93,7 @@ public class ApiRestServer implements Startable {
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}.
*/
@Override
public boolean stop() {
@@ -109,7 +108,7 @@ public class ApiRestServer implements Startable {
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}.
*/
@Override
public void shutdown() {
@@ -117,7 +116,7 @@ public class ApiRestServer implements Startable {
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}.
*/
@Override
public boolean isAlive() {
@@ -125,7 +124,7 @@ public class ApiRestServer implements Startable {
}
/**
- * {@inheritDoc}
+ * {@inheritDoc}.
*/
@Override
public String toString() {
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/HealthCheckProvider.java b/main/src/main/java/org/onap/policy/api/main/rest/HealthCheckProvider.java
index 33eda9dc..dd223384 100644
--- a/main/src/main/java/org/onap/policy/api/main/rest/HealthCheckProvider.java
+++ b/main/src/main/java/org/onap/policy/api/main/rest/HealthCheckProvider.java
@@ -20,8 +20,8 @@
package org.onap.policy.api.main.rest;
-import org.onap.policy.common.endpoints.report.HealthCheckReport;
import org.onap.policy.api.main.startstop.ApiActivator;
+import org.onap.policy.common.endpoints.report.HealthCheckReport;
/**
* Class to fetch health check of api service.
diff --git a/main/src/main/java/org/onap/policy/api/main/startstop/ApiActivator.java b/main/src/main/java/org/onap/policy/api/main/startstop/ApiActivator.java
index 2173ef3a..1f7b05aa 100644
--- a/main/src/main/java/org/onap/policy/api/main/startstop/ApiActivator.java
+++ b/main/src/main/java/org/onap/policy/api/main/startstop/ApiActivator.java
@@ -20,12 +20,12 @@
package org.onap.policy.api.main.startstop;
+import org.onap.policy.api.main.PolicyApiException;
+import org.onap.policy.api.main.parameters.ApiParameterGroup;
import org.onap.policy.api.main.rest.ApiRestServer;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.common.parameters.ParameterService;
-import org.onap.policy.api.main.PolicyApiException;
-import org.onap.policy.api.main.parameters.ApiParameterGroup;
/**
* This class wraps a distributor so that it can be activated as a complete service together with all its api
@@ -56,7 +56,6 @@ public class ApiActivator {
*
* @throws PolicyApiException on errors in initializing the service
*/
- @SuppressWarnings("unchecked")
public void initialize() throws PolicyApiException {
LOGGER.debug("Policy api starting as a service . . .");
startApiRestServer();
diff --git a/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java b/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java
index 4306ef30..f165b16f 100644
--- a/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java
+++ b/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java
@@ -20,21 +20,21 @@
package org.onap.policy.api.main.startstop;
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URL;
+import java.util.Arrays;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
-import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.api.main.PolicyApiException;
import org.onap.policy.api.main.PolicyApiRuntimeException;
+import org.onap.policy.common.utils.resources.ResourceUtils;
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.URL;
-import java.util.Arrays;
/**
* This class reads and handles command line parameters for the policy api main program.
diff --git a/main/src/main/java/org/onap/policy/api/main/startstop/Main.java b/main/src/main/java/org/onap/policy/api/main/startstop/Main.java
index a533bed5..00d36873 100644
--- a/main/src/main/java/org/onap/policy/api/main/startstop/Main.java
+++ b/main/src/main/java/org/onap/policy/api/main/startstop/Main.java
@@ -20,13 +20,12 @@
package org.onap.policy.api.main.startstop;
+import java.util.Arrays;
import org.onap.policy.api.main.PolicyApiException;
-import org.onap.policy.common.logging.flexlogger.FlexLogger;
-import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.api.main.parameters.ApiParameterGroup;
import org.onap.policy.api.main.parameters.ApiParameterHandler;
-
-import java.util.Arrays;
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
/**
* This class initiates ONAP Policy Framework policy api.
diff --git a/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java b/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java
index 6ad8c72b..7a59dad6 100644
--- a/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java
+++ b/main/src/test/java/org/onap/policy/api/main/parameters/TestApiParameterGroup.java
@@ -23,7 +23,6 @@ package org.onap.policy.api.main.parameters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import org.junit.Test;
import org.onap.policy.common.parameters.GroupValidationResult;