diff options
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src')
2 files changed, 10 insertions, 1 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java index 3e02da611..8099ea7c2 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java +++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/controlloop/ControlLoopEventContext.java @@ -137,7 +137,7 @@ public class ControlLoopEventContext implements Serializable { // @formatter:off CompletableFuture<OperationOutcome> oldFuture = - retrievers.compute(name, (key, future) -> (future == null || future.isCancelled() ? null : future)); + retrievers.computeIfPresent(name, (key, future) -> future.isCancelled() ? null : future); // @formatter:on if (oldFuture != null) { diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java index add74aa42..b4a3318e7 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java +++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperator.java @@ -95,6 +95,15 @@ public abstract class HttpOperator extends OperatorPartial { throw new ParameterValidationRuntimeException("invalid parameters", result); } + doConfigure(params); + } + + /** + * Configures the operator using the specified parameters. + * + * @param params operator parameters + */ + protected void doConfigure(HttpParams params) { client = getClientFactory().get(params.getClientName()); path = params.getPath(); timeoutMs = TimeUnit.MILLISECONDS.convert(params.getTimeoutSec(), TimeUnit.SECONDS); |