diff options
author | a.sreekumar <ajith.sreekumar@est.tech> | 2019-06-20 09:39:59 +0000 |
---|---|---|
committer | a.sreekumar <ajith.sreekumar@est.tech> | 2019-06-20 09:39:59 +0000 |
commit | 0fbf039020488215008a2c1fef8a7801bade9177 (patch) | |
tree | 04187de83d54715d49d8fc4ba24bb92fc7e55523 /services/services-onappf/src/main | |
parent | 7b945416da394a3ae3e53a1a9ae8d21f6a4e761e (diff) |
Enable maven-checkstyle-plugin in apex-pdp
Enable maven-checkstyle-plugin in apex-pdp/pom.xml to fail the build at warning level.
Fix all the existing check style issues in the component.
Change-Id: I4de9c1bd9ca5a2876de9086d2d3526cbdc25c080
Issue-ID: POLICY-1732
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
Diffstat (limited to 'services/services-onappf/src/main')
3 files changed, 22 insertions, 23 deletions
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java index e08b5b344..e48d75eb7 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java @@ -105,40 +105,40 @@ public class ApexStarterActivator { // @formatter:off this.manager = new ServiceManager() .addAction("topics", - () -> TopicEndpoint.manager.start(), - () -> TopicEndpoint.manager.shutdown()) + () -> TopicEndpoint.manager.start(), + () -> TopicEndpoint.manager.shutdown()) .addAction("set alive", - () -> setAlive(true), - () -> setAlive(false)) + () -> setAlive(true), + () -> setAlive(false)) .addAction("register pdp status context object", - () -> Registry.register(ApexStarterConstants.REG_PDP_STATUS_OBJECT, + () -> Registry.register(ApexStarterConstants.REG_PDP_STATUS_OBJECT, new PdpMessageHandler().createPdpStatusFromParameters(instanceId, apexStarterParameterGroup.getPdpStatusParameters())), - () -> Registry.unregister(ApexStarterConstants.REG_PDP_STATUS_OBJECT)) + () -> Registry.unregister(ApexStarterConstants.REG_PDP_STATUS_OBJECT)) .addAction("topic sinks", - () -> Registry.register(ApexStarterConstants.REG_APEX_PDP_TOPIC_SINKS, topicSinks), - () -> Registry.unregister(ApexStarterConstants.REG_APEX_PDP_TOPIC_SINKS)) + () -> Registry.register(ApexStarterConstants.REG_APEX_PDP_TOPIC_SINKS, topicSinks), + () -> Registry.unregister(ApexStarterConstants.REG_APEX_PDP_TOPIC_SINKS)) .addAction("Pdp Status publisher", - () -> Registry.register(ApexStarterConstants.REG_PDP_STATUS_PUBLISHER, + () -> Registry.register(ApexStarterConstants.REG_PDP_STATUS_PUBLISHER, new PdpStatusPublisher(topicSinks, apexStarterParameterGroup.getPdpStatusParameters().getTimeIntervalMs())), - () -> stopAndRemovePdpStatusPublisher()) + () -> stopAndRemovePdpStatusPublisher()) .addAction("Register pdp update listener", () -> msgDispatcher.register(PdpMessageType.PDP_UPDATE.name(), pdpUpdateListener), () -> msgDispatcher.unregister(PdpMessageType.PDP_UPDATE.name())) .addAction("Register pdp state change request dispatcher", - () -> msgDispatcher.register(PdpMessageType.PDP_STATE_CHANGE.name(), pdpStateChangeListener), - () -> msgDispatcher.unregister(PdpMessageType.PDP_STATE_CHANGE.name())) + () -> msgDispatcher.register(PdpMessageType.PDP_STATE_CHANGE.name(), pdpStateChangeListener), + () -> msgDispatcher.unregister(PdpMessageType.PDP_STATE_CHANGE.name())) .addAction("Message Dispatcher", () -> registerMsgDispatcher(), () -> unregisterMsgDispatcher()) .addAction("Create REST server", - () -> restServer = + () -> restServer = new ApexStarterRestServer(apexStarterParameterGroup.getRestServerParameters()), - () -> restServer = null) + () -> restServer = null) .addAction("Rest Server", - () -> restServer.start(), - () -> restServer.stop()); + () -> restServer.start(), + () -> restServer.stop()); // @formatter:on } diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java index 8cb3ae13e..699f26c66 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.services.onappf.handler; import com.google.gson.JsonObject; import java.io.IOException; -import java.io.StringReader; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java index 53efa5940..b58a3db24 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/HealthCheckRestControllerV1.java @@ -51,15 +51,15 @@ import org.onap.policy.common.endpoints.report.HealthCheckReport; @Api(value = "PDP-A API") @Produces(MediaType.APPLICATION_JSON) @SwaggerDefinition( - info = @Info(description = + info = @Info(description = "PDP-A is responsible for making policy decisions and for managing the administrative" + " state of the PDPs as directed by PolicyAdministration", version = "v1.0", title = "PDP-A"), - consumes = {MediaType.APPLICATION_JSON}, - produces = {MediaType.APPLICATION_JSON}, - schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS}, - tags = {@Tag(name = "PDP-A", description = "PDP-A Operations")}, - securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")})) + consumes = {MediaType.APPLICATION_JSON}, + produces = {MediaType.APPLICATION_JSON}, + schemes = {SwaggerDefinition.Scheme.HTTP, SwaggerDefinition.Scheme.HTTPS}, + tags = {@Tag(name = "PDP-A", description = "PDP-A Operations")}, + securityDefinition = @SecurityDefinition(basicAuthDefinitions = {@BasicAuthDefinition(key = "basicAuth")})) //@formatter:on public class HealthCheckRestControllerV1 { |