From 71a2c192c13200c5f864bca610e1ba6cf99e8e82 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 7 May 2021 18:07:09 -0400 Subject: Fix sonars in policy-models actors Fixed: - use "var" - don't throw generic Exception Issue-ID: POLICY-3094 Change-Id: I020addb9511fd665b5fed48e7d40719e27039224 Signed-off-by: Jim Hahn --- .../org/onap/policy/controlloop/actor/guard/DecisionOperation.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'models-interactions/model-actors/actor.guard/src/main') diff --git a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperation.java b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperation.java index f18a04fd1..6291c9331 100644 --- a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperation.java +++ b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/DecisionOperation.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ package org.onap.policy.controlloop.actor.guard; import java.util.Collections; import java.util.Map; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Executor; import javax.ws.rs.client.Entity; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -96,8 +95,8 @@ public class DecisionOperation extends HttpOperation { // guard is disabled, thus it is always treated as a success logger.info("{}: guard disabled, always succeeds for {}", getFullName(), params.getRequestId()); - final Executor executor = params.getExecutor(); - final CallbackManager callbacks = new CallbackManager(); + final var executor = params.getExecutor(); + final var callbacks = new CallbackManager(); return CompletableFuture.completedFuture(makeOutcome()) .whenCompleteAsync(callbackStarted(callbacks), executor) -- cgit 1.2.3-korg