aboutsummaryrefslogtreecommitdiffstats
path: root/core/core-protocols/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-09-03 13:32:01 +0100
committerliamfallon <liam.fallon@est.tech>2020-09-03 15:40:06 +0100
commit386d8b15efd66cbd176e9911806c55a437cc6376 (patch)
tree0ea6603a5cfd1ee24721a63e494ef48ffedb6b23 /core/core-protocols/src
parent6f154bcd5c86bf9027d297df8cbdb8310eb88754 (diff)
Clean up warnings and SONAR issues
Issue-ID: POLICY-2654 Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'core/core-protocols/src')
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java19
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyMessage.java10
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java3
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/ResponseTest.java1
-rw-r--r--core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/engdep/messages/UpdateModelTest.java1
5 files changed, 15 insertions, 19 deletions
diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java
index bc8d5e5c1..3d15a8c01 100644
--- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java
+++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/DummyAction.java
@@ -1,34 +1,33 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
package org.onap.policy.apex.core.protocols;
-import org.onap.policy.apex.core.protocols.Action;
-
/**
* Dummy action for testing.
*/
public class DummyAction implements Action {
private static final long serialVersionUID = 9178856761163651594L;
-
- private String actionString = "An Action String";
+
+ private String actionString = "An Action String";
public DummyAction(final String actionString) {
this.actionString = actionString;
@@ -59,15 +58,15 @@ public class DummyAction implements Action {
if (this == obj) {
return true;
}
-
+
if (obj == null) {
return false;
}
-
+
if (getClass() != obj.getClass()) {
return false;
}
-
+
DummyAction other = (DummyAction) obj;
if (actionString == null) {
if (other.actionString != 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 aeeb43dda..5e32c00e4 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
@@ -1,26 +1,26 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
package org.onap.policy.apex.core.protocols;
-import org.onap.policy.apex.core.protocols.Message;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
/**
@@ -33,7 +33,7 @@ public class DummyMessage extends Message {
public DummyMessage(final Action action, final AxArtifactKey targetKey) {
super(action, targetKey);
}
-
+
public DummyMessage(final Action action, final AxArtifactKey targetKey, final String messageData) {
super(action, targetKey, messageData);
}
diff --git a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java
index db13069f1..c4de748ee 100644
--- a/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java
+++ b/core/core-protocols/src/test/java/org/onap/policy/apex/core/protocols/SupportMessageTester.java
@@ -34,7 +34,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
*/
public class SupportMessageTester {
- @SuppressWarnings("unlikely-arg-type")
@Test
public void testMessage() {
assertNotNull(new DummyMessage(new DummyAction(null), new AxArtifactKey()));
@@ -43,7 +42,7 @@ public class SupportMessageTester {
DummyMessage dummyMessage = new DummyMessage(new DummyAction(null), new AxArtifactKey("Target:0.0.1"));
assertEquals(new DummyAction(null), dummyMessage.getAction());
assertEquals("Message [action=org.onap.policy.apex.core.protocols.DummyAction@1f, "
- + "targetKey=AxArtifactKey:(name=Target,version=0.0.1), data=null]", dummyMessage.toString());
+ + "targetKey=AxArtifactKey:(name=Target,version=0.0.1), data=null]", dummyMessage.toString());
dummyMessage.setMessageData("Message Data");
assertEquals("Message Data", dummyMessage.getMessageData());
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 35fe5bb9f..a78c670b5 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
@@ -47,7 +47,6 @@ public class ResponseTest {
*
* @throws UnknownHostException the unknown host exception
*/
- @SuppressWarnings("unlikely-arg-type")
@Test
public void testResponse() throws UnknownHostException {
final AxArtifactKey responseKey = new AxArtifactKey("ResponseTest", "0.0.1");
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 13d37a8f6..953c6fa8a 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
@@ -49,7 +49,6 @@ public class UpdateModelTest {
*
* @throws UnknownHostException the unknown host exception
*/
- @SuppressWarnings("unlikely-arg-type")
@Test
public void testRegisterEntity() throws UnknownHostException {
assertNotNull(new UpdateModel(new AxArtifactKey()));