diff options
author | liamfallon <liam.fallon@est.tech> | 2020-06-19 17:04:51 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2020-06-19 17:05:05 +0100 |
commit | 9c0c0c8f61a08aec5c95ebb90647a0aae445e129 (patch) | |
tree | 4224dadcc265e2980a6f097976a3beb34ce14e93 /examples/examples-adaptive | |
parent | 73470fb02d3d8a2fb37e80d9fb23a75955da32b5 (diff) |
Changes for checkstyle 8.32
Issue-ID: POLICY-2188
Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'examples/examples-adaptive')
6 files changed, 13 insertions, 16 deletions
diff --git a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AnomalyDetectionPolicyDecideTaskSelectionLogic.java b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AnomalyDetectionPolicyDecideTaskSelectionLogic.java index 99dd28dd8..6c1998108 100644 --- a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AnomalyDetectionPolicyDecideTaskSelectionLogic.java +++ b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AnomalyDetectionPolicyDecideTaskSelectionLogic.java @@ -26,13 +26,11 @@ import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; - import org.apache.commons.math3.distribution.TDistribution; import org.apache.commons.math3.util.FastMath; import org.onap.policy.apex.core.engine.executor.context.TaskSelectionExecutionContext; import org.onap.policy.apex.examples.adaptive.concepts.AnomalyDetection; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; -import org.slf4j.Logger; /** * The Class AnomalyDetectionPolicyDecideTaskSelectionLogic. diff --git a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java index ef697b077..c0aa620ac 100644 --- a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java +++ b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.examples.adaptive.model.java; import java.util.Arrays; import java.util.List; import java.util.Random; - import org.onap.policy.apex.context.ContextException; import org.onap.policy.apex.core.engine.executor.context.TaskSelectionExecutionContext; import org.onap.policy.apex.examples.adaptive.concepts.AutoLearn; diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java index 623588267..f1c8d7dca 100644 --- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java +++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java @@ -20,18 +20,20 @@ package org.onap.policy.apex.examples.adaptive; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; import java.util.LinkedList; import java.util.List; - import org.junit.Test; import org.onap.policy.apex.examples.adaptive.concepts.AnomalyDetection; public class AnomalyDetectionConceptTest { @Test - public void testToString(){ + public void testToString() { AnomalyDetection anomalyDetection = new AnomalyDetection(); List<Double> newAnomalyScores = new LinkedList<>(); newAnomalyScores.add((double) 55); @@ -39,13 +41,14 @@ public class AnomalyDetectionConceptTest { anomalyDetection.setFrequency(55); assertEquals(newAnomalyScores, anomalyDetection.getAnomalyScores()); assertTrue(anomalyDetection.checkSetAnomalyScores()); - assertEquals(55,anomalyDetection.getFrequency()); - assertEquals(true,anomalyDetection.getFirstRound()); - assertEquals("AnomalyDetection [firstRound=true, frequency=55, anomalyScores=[55.0], frequencyForecasted=null]", anomalyDetection.toString()); + assertEquals(55, anomalyDetection.getFrequency()); + assertEquals(true, anomalyDetection.getFirstRound()); + assertEquals("AnomalyDetection [firstRound=true, frequency=55, anomalyScores=[55.0], frequencyForecasted=null]", + anomalyDetection.toString()); } @Test - public void testHashCode(){ + public void testHashCode() { AnomalyDetection detection = new AnomalyDetection(); AnomalyDetection compareDetection = new AnomalyDetection(); assertEquals(detection.hashCode(), compareDetection.hashCode()); @@ -99,13 +102,13 @@ public class AnomalyDetectionConceptTest { } @Test - public void testCheckSets(){ + public void testCheckSets() { AnomalyDetection anomalyDetection = new AnomalyDetection(); assertFalse(anomalyDetection.checkSetAnomalyScores()); List<Double> anomalyScores = new LinkedList<>(); anomalyDetection.setAnomalyScores(anomalyScores); assertFalse(anomalyDetection.checkSetAnomalyScores()); - anomalyScores.add((double)2); + anomalyScores.add((double) 2); anomalyDetection.setAnomalyScores(anomalyScores); assertTrue(anomalyDetection.checkSetAnomalyScores()); anomalyDetection.unsetAnomalyScores(); @@ -115,7 +118,7 @@ public class AnomalyDetectionConceptTest { List<Double> frequencyForecasted = new LinkedList<>(); anomalyDetection.setFrequencyForecasted(frequencyForecasted); assertFalse(anomalyDetection.checkSetFrequencyForecasted()); - frequencyForecasted.add((double)2); + frequencyForecasted.add((double) 2); anomalyDetection.setFrequencyForecasted(frequencyForecasted); assertTrue(anomalyDetection.checkSetFrequencyForecasted()); anomalyDetection.unsetFrequencyForecasted(); diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java index d1b2aaae7..5beab7724 100644 --- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java +++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java @@ -29,7 +29,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.Random; import java.util.concurrent.TimeUnit; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java index ab0bf303f..52d1b7ff8 100644 --- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java +++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java @@ -29,7 +29,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.Random; import java.util.concurrent.TimeUnit; - import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java index b06908da2..702b050fd 100644 --- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java +++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java @@ -26,7 +26,6 @@ import static org.awaitility.Awaitility.await; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; - import org.onap.policy.apex.core.engine.engine.EnEventListener; import org.onap.policy.apex.core.engine.event.EnEvent; |