diff options
Diffstat (limited to 'core')
75 files changed, 22 insertions, 114 deletions
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java index 90b1519f5..6ec19fcfa 100644 --- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java +++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.deployment; import java.io.PrintStream; import java.util.Arrays; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; import org.slf4j.ext.XLogger; diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java index 900e0a2f8..9033ff423 100644 --- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java +++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java @@ -150,8 +150,7 @@ public class DeploymentClient implements Runnable { private InetAddress getLocalAddress() { try { return MessagingUtils.getLocalHostLanAddress(); - } - catch (UnknownHostException e) { + } catch (UnknownHostException e) { LOGGER.debug("engine<-->deployment client failed to find the localhost address - continuing ...", e); return null; } diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java index f98485343..9dfcf4d1a 100644 --- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java +++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java @@ -25,7 +25,6 @@ import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.net.URL; import java.util.concurrent.TimeUnit; - import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; import org.onap.policy.apex.core.protocols.Message; import org.onap.policy.apex.core.protocols.engdep.messages.EngineServiceInfoResponse; diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java index 09d5e8e4b..385640050 100644 --- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java +++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.deployment; import java.io.PrintStream; import java.util.Arrays; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.slf4j.ext.XLogger; diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/ApexDeploymentExceptionTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/ApexDeploymentExceptionTest.java index d87c6caa5..3a22fad12 100644 --- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/ApexDeploymentExceptionTest.java +++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/ApexDeploymentExceptionTest.java @@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.io.IOException; - import org.junit.Test; /** diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java index e0610df0d..5871204b5 100644 --- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java +++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java @@ -28,7 +28,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.PrintStream; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DeploymentClientTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DeploymentClientTest.java index f51b2337c..ddbcf2176 100644 --- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DeploymentClientTest.java +++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DeploymentClientTest.java @@ -32,7 +32,6 @@ import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; - import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java index 4eda2eeba..4432a38a6 100644 --- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java +++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java @@ -29,7 +29,6 @@ import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; - import org.onap.policy.apex.core.protocols.Message; import org.onap.policy.apex.core.protocols.engdep.messages.EngineServiceInfoResponse; import org.onap.policy.apex.core.protocols.engdep.messages.GetEngineInfo; diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java index a676031cb..6d2015562 100644 --- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java +++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java @@ -26,7 +26,6 @@ import static org.junit.Assert.fail; import java.io.ByteArrayInputStream; import java.io.InputStream; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/TaskParameters.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/TaskParameters.java index 64474f0e8..2bb3dc19a 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/TaskParameters.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/TaskParameters.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.engine; import lombok.Getter; import lombok.Setter; - import org.onap.policy.common.parameters.BeanValidator; import org.onap.policy.common.parameters.ValidationResult; import org.onap.policy.common.parameters.annotations.NotBlank; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java index c1007b1fe..32f86e465 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/StateMachineHandler.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.engine.engine.impl; import java.util.HashMap; - import org.onap.policy.apex.core.engine.context.ApexInternalContext; import org.onap.policy.apex.core.engine.event.EnEvent; import org.onap.policy.apex.core.engine.executor.ExecutorFactory; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java index 9a5acbf3e..2f9627dd1 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java @@ -30,10 +30,8 @@ import java.util.Map; import java.util.Properties; import java.util.Random; import java.util.Set; - import lombok.Getter; import lombok.Setter; - import org.onap.policy.apex.core.engine.monitoring.EventMonitor; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnField.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnField.java index e7d4643fd..63a45fee2 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnField.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnField.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.engine.event; import java.io.Serializable; - import org.onap.policy.apex.context.ContextRuntimeException; import org.onap.policy.apex.context.SchemaHelper; import org.onap.policy.apex.context.impl.schema.SchemaHelperFactory; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java index cb0cfabc4..7ebed1d49 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/Executor.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.engine.executor; import java.util.Properties; - import org.onap.policy.apex.core.engine.ExecutorParameters; import org.onap.policy.apex.core.engine.executor.exception.StateMachineException; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java index 192653930..b04c354e5 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateExecutor.java @@ -26,7 +26,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Properties; import java.util.TreeMap; - import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.ExecutorParameters; import org.onap.policy.apex.core.engine.context.ApexInternalContext; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java index b13db033a..5f9951813 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java @@ -25,9 +25,7 @@ import static org.onap.policy.common.utils.validation.Assertions.argumentOfClass import java.util.Map; import java.util.Properties; - import lombok.NonNull; - import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.ExecutorParameters; import org.onap.policy.apex.core.engine.context.ApexInternalContext; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java index 73ace3de2..67a3e6d79 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutor.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.core.engine.executor; import java.util.Map; import java.util.Properties; import java.util.TreeMap; - import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.ExecutorParameters; import org.onap.policy.apex.core.engine.context.ApexInternalContext; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateOutput.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateOutput.java index 40de843ea..9c3c6f893 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateOutput.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateOutput.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.core.engine.executor; import java.util.Map; import java.util.Map.Entry; - import org.onap.policy.apex.core.engine.event.EnEvent; import org.onap.policy.apex.core.engine.executor.exception.StateMachineException; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java index 3f360ea9c..fa75db60e 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java @@ -24,9 +24,7 @@ package org.onap.policy.apex.core.engine.executor; import static org.onap.policy.common.utils.validation.Assertions.argumentNotNull; import java.util.Properties; - import lombok.NonNull; - import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.ExecutorParameters; import org.onap.policy.apex.core.engine.context.ApexInternalContext; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java index bb8e36275..f433eedcd 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacade.java @@ -24,7 +24,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.service.ModelService; import org.onap.policy.apex.model.policymodel.concepts.AxState; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java index 26753a821..55d629d84 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java @@ -27,10 +27,8 @@ import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.TreeMap; - import lombok.Getter; import lombok.Setter; - import org.onap.policy.apex.context.ContextAlbum; import org.onap.policy.apex.context.ContextRuntimeException; import org.onap.policy.apex.core.engine.context.ApexInternalContext; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java index 0b99c4356..9d5087e83 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java @@ -28,10 +28,8 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.TreeMap; - import lombok.Getter; import lombok.Setter; - import org.onap.policy.apex.context.ContextAlbum; import org.onap.policy.apex.context.ContextRuntimeException; import org.onap.policy.apex.core.engine.context.ApexInternalContext; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java index 7cfb6348e..2006d653c 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java @@ -26,10 +26,8 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.TreeMap; - import lombok.Getter; import lombok.Setter; - import org.onap.policy.apex.context.ContextAlbum; import org.onap.policy.apex.context.ContextRuntimeException; import org.onap.policy.apex.core.engine.context.ApexInternalContext; diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java index 809dc737e..e37d074b6 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/impl/ExecutorFactoryImpl.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.core.engine.executor.impl; import java.util.Map; import java.util.Map.Entry; import java.util.TreeMap; - import org.onap.policy.apex.core.engine.EngineParameterConstants; import org.onap.policy.apex.core.engine.EngineParameters; import org.onap.policy.apex.core.engine.ExecutorParameters; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java index f91b58bb9..b066e45c1 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImplTest.java @@ -34,7 +34,6 @@ import java.io.IOException; import java.lang.reflect.Field; import java.util.HashMap; import java.util.concurrent.TimeUnit; - import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/DummySlowEnEventListener.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/DummySlowEnEventListener.java index 178e16a43..47b85629f 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/DummySlowEnEventListener.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/DummySlowEnEventListener.java @@ -40,8 +40,7 @@ public class DummySlowEnEventListener implements EnEventListener { public void onEnEvent(EnEvent enEvent) throws ApexException { try { Thread.sleep(waitTime); - } - catch (InterruptedException ie) { + } catch (InterruptedException ie) { //Do nothing } } diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/DummySmExecutor.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/DummySmExecutor.java index 9fa9015b3..18d32140b 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/DummySmExecutor.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/engine/impl/DummySmExecutor.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.engine.engine.impl; import java.util.Properties; - import org.onap.policy.apex.core.engine.event.EnEvent; import org.onap.policy.apex.core.engine.executor.ExecutorFactory; import org.onap.policy.apex.core.engine.executor.StateMachineExecutor; @@ -53,8 +52,7 @@ public class DummySmExecutor extends StateMachineExecutor { public void prepare() throws StateMachineException { if (prepareWorks) { prepareWorks = false; - } - else { + } else { prepareWorks = true; throw new StateMachineException("dummy state machine executor exception"); } @@ -75,8 +73,7 @@ public class DummySmExecutor extends StateMachineExecutor { public void cleanUp() throws StateMachineException { if (cleanupWorks) { cleanupWorks = false; - } - else { + } else { cleanupWorks = true; throw new StateMachineException("dummy state machine executor exception"); } diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/DummyAxKey.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/DummyAxKey.java index cef1c7bc5..eafa7f419 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/DummyAxKey.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/DummyAxKey.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.engine.event; import java.util.List; - import org.apache.commons.lang3.NotImplementedException; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.apex.model.basicmodel.concepts.AxKey; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java index 4fd9367ca..e3d0b32b8 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnEventTest.java @@ -29,7 +29,6 @@ import static org.junit.Assert.fail; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnExceptionTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnExceptionTest.java index ee54fd959..5ca49e479 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnExceptionTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnExceptionTest.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.core.engine.event; import static org.junit.Assert.assertEquals; import java.io.IOException; - import org.junit.Test; /** diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/DummyStateFinalizerExecutor.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/DummyStateFinalizerExecutor.java index 58a025bd5..5a011b2aa 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/DummyStateFinalizerExecutor.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/DummyStateFinalizerExecutor.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.core.engine.executor; import java.util.Map; import java.util.Properties; - import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.executor.exception.StateMachineException; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/DummyTaskSelectExecutor.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/DummyTaskSelectExecutor.java index 9f9713c9c..02a32d4e7 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/DummyTaskSelectExecutor.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/DummyTaskSelectExecutor.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.engine.executor; import java.util.Properties; - import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.event.EnEvent; import org.onap.policy.apex.core.engine.executor.exception.StateMachineException; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java index a46ddfb9e..30c7403ce 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java @@ -27,7 +27,6 @@ import static org.junit.Assert.fail; import java.util.Map; import java.util.Properties; - import org.junit.Before; import org.junit.Test; import org.mockito.Mock; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java index 7256b3f31..d968691f6 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateMachineExecutorTest.java @@ -28,7 +28,6 @@ import static org.junit.Assert.fail; import java.util.LinkedHashMap; import java.util.Map; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java index a9218ea98..bbedb886c 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java @@ -32,7 +32,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Properties; - import org.junit.Before; import org.junit.Test; import org.mockito.Mock; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java index 817b1615f..182ce3597 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java @@ -28,7 +28,6 @@ import static org.junit.Assert.fail; import java.util.LinkedHashMap; import java.util.Map; import java.util.Properties; - import org.junit.Before; import org.junit.Test; import org.mockito.Mock; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java index a35af534e..68d478877 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxStateFacadeTest.java @@ -25,7 +25,6 @@ import static org.junit.Assert.assertNull; import java.util.LinkedHashMap; import java.util.Map; - import org.junit.Before; import org.junit.Test; import org.mockito.Mock; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java index a18718cc5..cfa43ecf6 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/AxTaskFacadeTest.java @@ -26,7 +26,6 @@ import static org.junit.Assert.fail; import java.util.LinkedHashMap; import java.util.Map; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/DummyContextAlbum.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/DummyContextAlbum.java index 9dd5cada2..156e64b16 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/DummyContextAlbum.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/DummyContextAlbum.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.core.engine.executor.context; import java.util.Collection; import java.util.Map; import java.util.Set; - import org.apache.commons.lang3.NotImplementedException; import org.onap.policy.apex.context.ContextAlbum; import org.onap.policy.apex.context.ContextException; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java index fe437b823..bbd86ed54 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContextTest.java @@ -28,7 +28,6 @@ import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; - import org.junit.Before; import org.junit.Test; import org.mockito.Mock; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java index 02e271717..2f8b91ecc 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContextTest.java @@ -28,7 +28,6 @@ import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; - import org.junit.Before; import org.junit.Test; import org.mockito.Mock; diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeExceptionTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeExceptionTest.java index e77002627..84f330308 100644 --- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeExceptionTest.java +++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/exception/StateMachineRuntimeExceptionTest.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.core.engine.executor.exception; import static org.junit.Assert.assertEquals; import java.io.IOException; - import org.junit.Test; /** diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java index 6da92d55e..aa3adf4d0 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java @@ -32,7 +32,6 @@ import java.util.Set; import java.util.TreeSet; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; - import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; @@ -129,9 +128,8 @@ public abstract class ClassUtils { // Directories may contain ".class" files if (urlFile.isDirectory()) { classNameSet.addAll(processDir(urlFile, url.getFile())); - } - // JARs are processed as well - else if (url.getFile().endsWith(".jar")) { + } else if (url.getFile().endsWith(".jar")) { + // JARs are processed as well classNameSet.addAll(processJar(urlFile)); } // It's a resource or some other non-executable thing diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassBuilder.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassBuilder.java index 7695e29fd..5cc3f21c7 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassBuilder.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassBuilder.java @@ -23,13 +23,11 @@ package org.onap.policy.apex.core.infrastructure.java.compile.singleclass; import java.util.Arrays; import java.util.List; - import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; import javax.tools.ToolProvider; - import org.onap.policy.apex.core.infrastructure.java.JavaHandlingException; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassByteCodeFileObject.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassByteCodeFileObject.java index 95e2fb949..4a0536ee1 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassByteCodeFileObject.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassByteCodeFileObject.java @@ -24,7 +24,6 @@ import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.URI; - import javax.tools.SimpleJavaFileObject; /** diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassCompilationUnit.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassCompilationUnit.java index 63662f551..34398edd3 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassCompilationUnit.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleClassCompilationUnit.java @@ -24,7 +24,6 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.URI; - import javax.tools.SimpleJavaFileObject; /** diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleFileManager.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleFileManager.java index 6bd7e3a55..ffa166393 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleFileManager.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/compile/singleclass/SingleFileManager.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.infrastructure.java.compile.singleclass; import java.io.IOException; - import javax.tools.FileObject; import javax.tools.ForwardingJavaFileManager; import javax.tools.JavaCompiler; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessageHolder.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessageHolder.java index cd353b95d..e5c5aaee5 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessageHolder.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessageHolder.java @@ -24,7 +24,6 @@ import java.io.Serializable; import java.net.InetAddress; import java.util.ArrayList; import java.util.List; - import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingServiceFactory.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingServiceFactory.java index b38b32f0e..9721258c6 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingServiceFactory.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingServiceFactory.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.infrastructure.messaging; import java.net.InetSocketAddress; import java.net.URI; - import org.onap.policy.apex.core.infrastructure.messaging.impl.ws.client.MessagingClient; import org.onap.policy.apex.core.infrastructure.messaging.impl.ws.server.MessageServerImpl; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/InternalMessageBusClient.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/InternalMessageBusClient.java index 17391fb89..ad0dbb5a4 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/InternalMessageBusClient.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/InternalMessageBusClient.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.infrastructure.messaging.impl.ws.client; import java.net.URI; import java.nio.ByteBuffer; - import org.onap.policy.apex.core.infrastructure.messaging.MessageListener; import org.onap.policy.apex.core.infrastructure.messaging.impl.ws.RawMessageHandler; import org.onap.policy.apex.core.infrastructure.messaging.impl.ws.messageblock.MessageBlockHandler; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/MessagingClient.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/MessagingClient.java index 003a8ef26..5d45c473b 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/MessagingClient.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/MessagingClient.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.infrastructure.messaging.impl.ws.client; import java.net.URI; - import org.java_websocket.WebSocket; import org.onap.policy.apex.core.infrastructure.messaging.MessageHolder; import org.onap.policy.apex.core.infrastructure.messaging.MessagingService; @@ -119,9 +118,8 @@ public class MessagingClient<M> extends InternalMessageBusClient<M> implements M default: break; } - } + } while (timeoutMsCounter > 0); // While the timeout value has not expired - while (timeoutMsCounter > 0); // We have timed out return false; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/WebSocketClientImpl.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/WebSocketClientImpl.java index daa22d7ff..69609aefc 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/WebSocketClientImpl.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/client/WebSocketClientImpl.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.infrastructure.messaging.impl.ws.client; import java.net.URI; - import org.java_websocket.client.WebSocketClient; import org.java_websocket.handshake.ServerHandshake; import org.slf4j.ext.XLogger; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/MessageBlock.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/MessageBlock.java index 1c6852686..ba98fd748 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/MessageBlock.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/MessageBlock.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.infrastructure.messaging.impl.ws.messageblock; import java.util.List; - import org.java_websocket.WebSocket; /** diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/MessageBlockHandler.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/MessageBlockHandler.java index 123305b07..3134c67cf 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/MessageBlockHandler.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/MessageBlockHandler.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.infrastructure.messaging.impl.ws.messageblock; import com.google.common.eventbus.EventBus; - import org.onap.policy.apex.core.infrastructure.messaging.MessageListener; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/RawMessageBlock.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/RawMessageBlock.java index 3fa25b56b..7e8f09c5d 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/RawMessageBlock.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/messageblock/RawMessageBlock.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.infrastructure.messaging.impl.ws.messageblock; import java.nio.ByteBuffer; - import org.java_websocket.WebSocket; /** diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/InternalMessageBusServer.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/InternalMessageBusServer.java index 1fbd65115..18cdccce3 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/InternalMessageBusServer.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/InternalMessageBusServer.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.infrastructure.messaging.impl.ws.server; import java.net.InetSocketAddress; import java.nio.ByteBuffer; - import org.java_websocket.WebSocket; import org.onap.policy.apex.core.infrastructure.messaging.MessageListener; import org.onap.policy.apex.core.infrastructure.messaging.MessagingService; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java index 5b2167e75..27ba46c43 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java @@ -25,7 +25,6 @@ import java.io.IOException; import java.net.InetSocketAddress; import java.util.Collection; import java.util.concurrent.atomic.AtomicBoolean; - import org.java_websocket.WebSocket; import org.onap.policy.apex.core.infrastructure.messaging.MessageHolder; import org.onap.policy.apex.core.infrastructure.messaging.util.MessagingUtils; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/WebSocketServerImpl.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/WebSocketServerImpl.java index fed18994d..6eda6e2bc 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/WebSocketServerImpl.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/WebSocketServerImpl.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.infrastructure.messaging.impl.ws.server; import java.net.InetSocketAddress; - import org.java_websocket.WebSocket; import org.java_websocket.handshake.ClientHandshake; import org.java_websocket.server.WebSocketServer; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/stringmessaging/WsStringMessageClient.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/stringmessaging/WsStringMessageClient.java index 968ec97db..edf9ec03a 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/stringmessaging/WsStringMessageClient.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/stringmessaging/WsStringMessageClient.java @@ -22,9 +22,7 @@ package org.onap.policy.apex.core.infrastructure.messaging.stringmessaging; import com.google.common.eventbus.Subscribe; - import java.net.URI; - import org.onap.policy.apex.core.infrastructure.messaging.MessageListener; import org.onap.policy.apex.core.infrastructure.messaging.MessagingException; import org.onap.policy.apex.core.infrastructure.messaging.MessagingService; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/stringmessaging/WsStringMessageServer.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/stringmessaging/WsStringMessageServer.java index 6b1dc6709..55b2e36ff 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/stringmessaging/WsStringMessageServer.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/stringmessaging/WsStringMessageServer.java @@ -22,11 +22,9 @@ package org.onap.policy.apex.core.infrastructure.messaging.stringmessaging; import com.google.common.eventbus.Subscribe; - import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.UnknownHostException; - import org.onap.policy.apex.core.infrastructure.messaging.MessageListener; import org.onap.policy.apex.core.infrastructure.messaging.MessagingException; import org.onap.policy.apex.core.infrastructure.messaging.MessagingService; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java index 1c5f2a3a6..463e85f3e 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java @@ -29,7 +29,6 @@ import java.net.NetworkInterface; import java.net.Socket; import java.net.UnknownHostException; import java.util.Enumeration; - import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java index a9c57f385..53b8a7938 100644 --- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java +++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/xml/XPathReader.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.infrastructure.xml; import java.io.InputStream; - import javax.xml.XMLConstants; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilderFactory; @@ -30,7 +29,6 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpression; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; - import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; import org.w3c.dom.Document; diff --git a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtilsTest.java b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtilsTest.java index 4e69f44ee..060dccef3 100644 --- a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtilsTest.java +++ b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtilsTest.java @@ -17,16 +17,17 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.core.infrastructure.java.classes; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Set; import java.util.TreeSet; - import org.junit.Test; import org.mockito.Mockito; @@ -41,28 +42,29 @@ public class ClassUtilsTest { @Test public void testProcessFileName() { - assertEquals("testing.txt",ClassUtils.processFileName("testing.txt")); + assertEquals("testing.txt", ClassUtils.processFileName("testing.txt")); assertNull(ClassUtils.processFileName(null)); - assertEquals("",ClassUtils.processFileName("/classes/")); + assertEquals("", ClassUtils.processFileName("/classes/")); } @Test public void testProcessDir() throws Exception { File mockFile = Mockito.mock(File.class); - File mockChildFile = Mockito.mock(File.class); Mockito.when(mockFile.isDirectory()).thenReturn(false); - assertEquals(new TreeSet<>(),ClassUtils.processDir(mockFile, "Here")); - assertEquals(new TreeSet<>(),ClassUtils.processDir(null, "Test")); + assertEquals(new TreeSet<>(), ClassUtils.processDir(mockFile, "Here")); + assertEquals(new TreeSet<>(), ClassUtils.processDir(null, "Test")); Mockito.when(mockFile.isDirectory()).thenReturn(true); + + File mockChildFile = Mockito.mock(File.class); File[] files = {mockChildFile}; Mockito.when(mockFile.listFiles()).thenReturn(files); Mockito.when(mockChildFile.getName()).thenReturn("test.class"); Mockito.when(mockChildFile.getAbsolutePath()).thenReturn("/test/"); - assertEquals(Set.of(".test."),ClassUtils.processDir(mockFile, "Here")); + assertEquals(Set.of(".test."), ClassUtils.processDir(mockFile, "Here")); Mockito.when(mockChildFile.getName()).thenReturn("test.class"); - assertEquals(Set.of(".test."),ClassUtils.processDir(mockFile, "Here")); + assertEquals(Set.of(".test."), ClassUtils.processDir(mockFile, "Here")); Mockito.when(mockChildFile.getName()).thenReturn("$test.class"); - assertEquals(new TreeSet<>(),ClassUtils.processDir(mockFile, "Here")); + assertEquals(new TreeSet<>(), ClassUtils.processDir(mockFile, "Here")); } } diff --git a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/DummyMessageListener.java b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/DummyMessageListener.java index f85301710..d9bd93cd2 100644 --- a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/DummyMessageListener.java +++ b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/DummyMessageListener.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.infrastructure.messaging; import com.google.common.eventbus.Subscribe; - import org.onap.policy.apex.core.infrastructure.messaging.impl.ws.messageblock.MessageBlock; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/EndToEndStringMessagingTest.java b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/EndToEndStringMessagingTest.java index 35d348568..e5375b770 100644 --- a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/EndToEndStringMessagingTest.java +++ b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/EndToEndStringMessagingTest.java @@ -26,7 +26,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.util.concurrent.TimeUnit; - import org.junit.Test; import org.onap.policy.apex.core.infrastructure.messaging.stringmessaging.WsStringMessageClient; import org.onap.policy.apex.core.infrastructure.messaging.stringmessaging.WsStringMessageListener; diff --git a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingUtilsTest.java b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingUtilsTest.java index 9eaaeeef2..a3c7ea419 100644 --- a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingUtilsTest.java +++ b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/messaging/MessagingUtilsTest.java @@ -17,6 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ + package org.onap.policy.apex.core.infrastructure.messaging; import static org.junit.Assert.assertEquals; @@ -26,7 +27,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; - import org.junit.Test; import org.onap.policy.apex.core.infrastructure.messaging.util.MessagingUtils; diff --git a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/threading/ThreadingTest.java b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/threading/ThreadingTest.java index ba6d4c627..35ad9386a 100644 --- a/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/threading/ThreadingTest.java +++ b/core/core-infrastructure/src/test/java/org/onap/policy/apex/core/infrastructure/threading/ThreadingTest.java @@ -21,14 +21,11 @@ package org.onap.policy.apex.core.infrastructure.threading; -import static org.awaitility.Awaitility.await; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.TimeUnit; - import org.junit.Test; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Message.java b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Message.java index ad025555b..6853cc75c 100644 --- a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Message.java +++ b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/Message.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.core.protocols; import java.io.Serializable; - import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; /** diff --git a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponse.java b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponse.java index 0df23d399..8c0c9860a 100644 --- a/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponse.java +++ b/core/core-protocols/src/main/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponse.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.core.protocols.engdep.messages; import java.util.Arrays; import java.util.Collection; - import org.onap.policy.apex.core.protocols.Message; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; @@ -104,8 +103,7 @@ public class EngineServiceInfoResponse extends Response { public void setEngineKeyArray(final Collection<AxArtifactKey> engineKeyCollection) { if (engineKeyCollection != null) { engineKeyArray = engineKeyCollection.toArray(new AxArtifactKey[engineKeyCollection.size()]); - } - else { + } else { engineKeyArray = null; } } diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java index 735c20e5d..aeeb43dda 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java @@ -20,7 +20,6 @@ package org.onap.policy.apex.core.protocols; -import org.onap.policy.apex.core.protocols.Action; import org.onap.policy.apex.core.protocols.Message; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/EngDepActionTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/EngDepActionTest.java index 1602dac1a..0b75bb584 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/EngDepActionTest.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/EngDepActionTest.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.core.protocols.engdep; import static org.junit.Assert.assertEquals; import org.junit.Test; -import org.onap.policy.apex.core.protocols.engdep.EngDepAction; /** * Test the Eng Dep Action class. diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java index 72d671f87..c240704e9 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/EngineServiceInfoResponseTest.java @@ -28,7 +28,6 @@ import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; - import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; @@ -76,7 +75,7 @@ public class EngineServiceInfoResponseTest { assertTrue(response.equals(response)); assertFalse(response.equals(null)); - assertFalse(response.equals((Object)new StartEngine(new AxArtifactKey()))); + assertFalse(response.equals((Object) new StartEngine(new AxArtifactKey()))); response = new EngineServiceInfoResponse(null, false, null); EngineServiceInfoResponse otherResponse = new EngineServiceInfoResponse(null, false, null); diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/GetEngineStatusTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/GetEngineStatusTest.java index 62cb5911f..a2a1e6a88 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/GetEngineStatusTest.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/GetEngineStatusTest.java @@ -24,9 +24,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.net.UnknownHostException; - import org.junit.Test; -import org.onap.policy.apex.core.protocols.engdep.messages.GetEngineStatus; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java index 447ceeace..2c1f658b3 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java @@ -25,10 +25,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.net.UnknownHostException; - import org.junit.Test; -import org.onap.policy.apex.core.protocols.engdep.messages.Response; -import org.onap.policy.apex.core.protocols.engdep.messages.UpdateModel; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java index b14d168b8..9f954b5a5 100644 --- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java +++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java @@ -25,9 +25,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.net.UnknownHostException; - import org.junit.Test; -import org.onap.policy.apex.core.protocols.engdep.messages.UpdateModel; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; |