diff --git a/OpenICF-java-framework/connector-framework-server/src/main/java/org/forgerock/openicf/framework/remote/ManagedAsyncConnectorInfoManager.java b/OpenICF-java-framework/connector-framework-server/src/main/java/org/forgerock/openicf/framework/remote/ManagedAsyncConnectorInfoManager.java index fb7dd3b3..b565e8bb 100644 --- a/OpenICF-java-framework/connector-framework-server/src/main/java/org/forgerock/openicf/framework/remote/ManagedAsyncConnectorInfoManager.java +++ b/OpenICF-java-framework/connector-framework-server/src/main/java/org/forgerock/openicf/framework/remote/ManagedAsyncConnectorInfoManager.java @@ -186,12 +186,13 @@ public Promise findConnectorInfoAsync( final Pair> cacheEntry = Pair.of(keyRange, PromiseImpl. create()); + rangePromiseCacheList.add(cacheEntry); cacheEntry.getValue().thenOnResultOrException(new Runnable() { public void run() { rangePromiseCacheList.remove(cacheEntry); } }); - rangePromiseCacheList.add(cacheEntry); + for (Map.Entry> entry : managedConnectorInfos .entrySet()) {