summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-12-02 13:02:11 -0500
committerJim Hahn <jrh3@att.com>2019-12-02 13:22:46 -0500
commit581aa3881e97c36faa23cd812a87d13bdc1a0054 (patch)
tree9f1d0b8318a4a225aee0d2e80d1c3de79b39de72 /main
parent6f904473b5c75947d870fad1a67a23aaf236d241 (diff)
Fix sonar issues in policy-api
The change to sonar cloud resulted in new issues being uncovered. Addressed two of the three issues with this: Remove this unused import... Add at least one assertion to this test case. The item left outstanding is: Make sure that command line arguments are used safely here. Issue-ID: POLICY-2206 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ie5dc339640102a5b4471e5b719338358ec3e0209 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/policy/api/main/parameters/ApiParameterGroup.java1
-rw-r--r--main/src/test/java/org/onap/policy/api/main/startstop/TestMain.java3
2 files changed, 2 insertions, 2 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 17f3f1ab..aa8ad973 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
@@ -20,7 +20,6 @@
package org.onap.policy.api.main.parameters;
-import java.util.ArrayList;
import java.util.List;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.parameters.GroupValidationResult;
diff --git a/main/src/test/java/org/onap/policy/api/main/startstop/TestMain.java b/main/src/test/java/org/onap/policy/api/main/startstop/TestMain.java
index d770b56c..b97b0ccc 100644
--- a/main/src/test/java/org/onap/policy/api/main/startstop/TestMain.java
+++ b/main/src/test/java/org/onap/policy/api/main/startstop/TestMain.java
@@ -21,6 +21,7 @@
package org.onap.policy.api.main.startstop;
+import static org.assertj.core.api.Assertions.assertThatCode;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -63,7 +64,7 @@ public class TestMain {
@Test
public void testMain_Help() {
final String[] apiConfigParameters = { "-h" };
- Main.main(apiConfigParameters);
+ assertThatCode(() -> Main.main(apiConfigParameters)).doesNotThrowAnyException();
}
@Test