summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-10-02 12:56:47 -0400
committerJim Hahn <jrh3@att.com>2020-10-02 12:59:47 -0400
commitc48e63f81e072c3cdf3f3fe84983285c0b8f1439 (patch)
tree1d4160dce789f5f80df6e1c2ada84af62c8d8155
parente6c06754e2edd4a5ff108983828a2dbb15739a2e (diff)
Fix eclipse/sonar warnings in models
Addressed the following eclipse/sonar warnings: - unused imports - unchanged type - unreachable "catch" block - reinterrupt Issue-ID: POLICY-2714 Change-Id: I2fe6011ec74b7fab8889050e5c83647ab034ea25 Signed-off-by: Jim Hahn <jrh3@att.com>
-rw-r--r--models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java1
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java2
-rw-r--r--models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/CdsSimulator.java3
-rw-r--r--models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/CdsServerParametersTest.java2
4 files changed, 4 insertions, 4 deletions
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java b/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java
index 14d6585ea..77ef939bd 100644
--- a/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java
+++ b/models-base/src/main/java/org/onap/policy/models/base/PfConceptContainer.java
@@ -35,7 +35,6 @@ import java.util.TreeSet;
import java.util.function.Function;
import javax.persistence.CascadeType;
import javax.persistence.EmbeddedId;
-import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java
index 21d7229a3..ff5f87c4e 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/ModifyNssiTest.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020 Wipro Limited.
+ * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -104,6 +105,7 @@ public class ModifyNssiTest extends BasicSoOperation {
}
@Override
+ @SuppressWarnings("unchecked")
protected Map<String, Object> makePayload() {
String payloadString = ResourceUtils
.getResourceAsString("src/test/resources/ModifyNSSI.json");
diff --git a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/CdsSimulator.java b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/CdsSimulator.java
index f1785c8ee..3418780bc 100644
--- a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/CdsSimulator.java
+++ b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/CdsSimulator.java
@@ -91,9 +91,8 @@ public class CdsSimulator {
responseObserver.onNext(builder.build());
} catch (InvalidProtocolBufferException e) {
throw new SimulatorRuntimeException("Cannot convert ExecutionServiceOutput output", e);
- } catch (IOException e) {
- throw new SimulatorRuntimeException("Cannot read ExecutionServiceOutput from file", e);
} catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
throw new SimulatorRuntimeException("Execution Interrupted", e);
}
}
diff --git a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/CdsServerParametersTest.java b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/CdsServerParametersTest.java
index 03aae8e61..7b0ab6bbe 100644
--- a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/CdsServerParametersTest.java
+++ b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/CdsServerParametersTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2020 Bell Canada.
+ * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +21,6 @@ package org.onap.policy.models.simulators;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.File;