aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appc/src
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-05-07 18:07:09 -0400
committerJim Hahn <jrh3@att.com>2021-05-07 18:13:22 -0400
commit71a2c192c13200c5f864bca610e1ba6cf99e8e82 (patch)
treeca4b6f8cc12a00b494b3337215bac6e2eca9a8e0 /models-interactions/model-actors/actor.appc/src
parentda708d64dc27f36ed5da733fca14ebfb4cc2832b (diff)
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 <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.appc/src')
-rw-r--r--models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
index 31b4aec6e..b8ec634e3 100644
--- a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
+++ b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java
@@ -79,7 +79,7 @@ public abstract class AppcOperation extends BidirectionalTopicOperation<Request,
* @return a new request
*/
protected Request makeRequest(int attempt, GenericVnf targetVnf) {
- Request request = new Request();
+ var request = new Request();
request.setCommonHeader(new CommonHeader());
request.getCommonHeader().setRequestId(params.getRequestId());
request.getCommonHeader().setSubRequestId(getSubRequestId());
@@ -139,7 +139,7 @@ public abstract class AppcOperation extends BidirectionalTopicOperation<Request,
return Status.STILL_WAITING;
}
- ResponseCode code = ResponseCode.toResponseCode(response.getStatus().getCode());
+ var code = ResponseCode.toResponseCode(response.getStatus().getCode());
if (code == null) {
throw new IllegalArgumentException(
"unknown APPC-C response status code: " + response.getStatus().getCode());