summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-06-03 16:09:33 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-03 16:09:33 +0000
commit9807f6ff95e833b29c3920d2adbfe2fc70e8a173 (patch)
tree2a3fbd370b0a5e16004b52cffc391a72ddec09df /models-interactions/model-actors
parent58f6742563ee9b20051d402598bd724eee62ae8b (diff)
parent4e16bffb503ad08b98abbb70dfe796172cee422e (diff)
Merge "Use plain HashMap instead of IdentityHashMap"
Diffstat (limited to 'models-interactions/model-actors')
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/FutureManager.java6
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/ListenerManager.java5
2 files changed, 6 insertions, 5 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/FutureManager.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/FutureManager.java
index aac2f77b7..42aaa820d 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/FutureManager.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/FutureManager.java
@@ -20,7 +20,8 @@
package org.onap.policy.controlloop.actorserviceprovider.pipeline;
-import java.util.IdentityHashMap;
+import java.util.HashMap;
+import java.util.Map;
import java.util.concurrent.Future;
import lombok.NoArgsConstructor;
@@ -38,8 +39,7 @@ public class FutureManager extends ListenerManager {
* needed if {@link #remove(Future)} is invoked, so that the same {@link Runnable} is
* used each time.
*/
- @SuppressWarnings("rawtypes")
- private final IdentityHashMap<Future, Runnable> future2listener = new IdentityHashMap<>(5);
+ private final Map<Future<?>, Runnable> future2listener = new HashMap<>(5);
/**
* Adds a future that is to be canceled when this controller is stopped. Note: if the
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/ListenerManager.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/ListenerManager.java
index 1d64a8710..b810de393 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/ListenerManager.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/pipeline/ListenerManager.java
@@ -21,7 +21,8 @@
package org.onap.policy.controlloop.actorserviceprovider.pipeline;
import java.util.ArrayList;
-import java.util.IdentityHashMap;
+import java.util.HashMap;
+import java.util.Map;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.onap.policy.controlloop.actorserviceprovider.Util;
@@ -40,7 +41,7 @@ public class ListenerManager {
/**
* Listeners to be executed when {@link #stop()} is invoked.
*/
- private final IdentityHashMap<Runnable, Void> listeners = new IdentityHashMap<>(5);
+ private final Map<Runnable, Void> listeners = new HashMap<>(5);
/**
* Indicates that operations within the pipeline should stop executing.