aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.vfc/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.vfc/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.vfc/src')
-rw-r--r--models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java4
-rw-r--r--models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcOperation.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java
index bc9642888..784054886 100644
--- a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.java
+++ b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/Restart.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.
@@ -61,7 +61,7 @@ public class Restart extends VfcOperation {
*/
protected Pair<String, VfcRequest> makeRequest() {
- VfcRequest request = super.constructVfcRequest();
+ var request = super.constructVfcRequest();
String requestUrl = "/" + request.getNsInstanceId() + "/heal";
return Pair.of(requestUrl, request);
}
diff --git a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcOperation.java b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcOperation.java
index 2d6dc5802..3e64506bf 100644
--- a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcOperation.java
+++ b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcOperation.java
@@ -172,20 +172,20 @@ public abstract class VfcOperation extends HttpOperation<VfcResponse> {
"Missing enrichment data for service instance, server id, or server name.");
}
- VfcHealActionVmInfo vmActionInfo = new VfcHealActionVmInfo();
+ var vmActionInfo = new VfcHealActionVmInfo();
vmActionInfo.setVmid(vmId);
vmActionInfo.setVmname(vmName);
- VfcHealAdditionalParams additionalParams = new VfcHealAdditionalParams();
+ var additionalParams = new VfcHealAdditionalParams();
additionalParams.setAction(getName());
additionalParams.setActionInfo(vmActionInfo);
- VfcHealRequest healRequest = new VfcHealRequest();
+ var healRequest = new VfcHealRequest();
healRequest.setVnfInstanceId(vnfId);
healRequest.setCause(getName());
healRequest.setAdditionalParams(additionalParams);
- VfcRequest request = new VfcRequest();
+ var request = new VfcRequest();
request.setHealRequest(healRequest);
request.setNsInstanceId(serviceInstance);
request.setRequestId(params.getRequestId());