From 952d4f5aab9913f961e77fa0457da5d38f31d94f Mon Sep 17 00:00:00 2001 From: liamfallon Date: Sun, 16 Sep 2018 02:03:12 +0100 Subject: Fix Sonar issues in apex Fixing various Sonar issues in apex. Issue-ID: POLICY-1034 Change-Id: Ie693637d75bd7e38c71b7ba04886fb75636276ed Signed-off-by: liamfallon --- .../java/org/onap/policy/apex/core/engine/engine/EnEventListener.java | 1 + .../src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java | 4 ++-- .../src/main/java/org/onap/policy/apex/core/engine/event/EnField.java | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'core/core-engine') diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/EnEventListener.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/EnEventListener.java index 32d638aef..12ba12665 100644 --- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/EnEventListener.java +++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/EnEventListener.java @@ -29,6 +29,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.ApexException; * @author Liam Fallon * */ +@FunctionalInterface public interface EnEventListener { /** 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 7c49af965..58bee8238 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 @@ -58,7 +58,7 @@ public class EnEvent extends HashMap { private final AxEvent axEvent; // The event monitor for this event - private final EventMonitor eventMonitor = new EventMonitor(); + private final transient EventMonitor eventMonitor = new EventMonitor(); // The stack of execution of this event, used for monitoring private AxConcept[] userArtifactStack; @@ -289,7 +289,7 @@ public class EnEvent extends HashMap { @Override public void putAll(final Map incomingMap) { // Override the generic "putAll()" call as we want to monitor the puts - for (final java.util.Map.Entry incomingEntry : incomingMap.entrySet()) { + for (final Map.Entry incomingEntry : incomingMap.entrySet()) { put(incomingEntry.getKey(), incomingEntry.getValue()); } } 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 15fbacf45..a4b221897 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 @@ -45,10 +45,10 @@ public class EnField implements Serializable { private final AxField axField; // The schema helper for this field - private SchemaHelper schemaHelper; + private transient SchemaHelper schemaHelper; // The value of this field - private final Object value; + private final transient Object value; /** * Instantiates a new EnField, an Engine Field. -- cgit 1.2.3-korg