From e7b9884cc75d9346dc56145725d2aa69a6cd4f43 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 2 Dec 2020 14:41:19 -0500 Subject: Address sonar issues in policy/models Addressed the following issues: - unused parameter in method call - make constructor of abstract class protected instead of public Issue-ID: POLICY-2905 Change-Id: I1e846b88246796f1ad5cee4a3bd296647732fd24 Signed-off-by: Jim Hahn --- .../main/java/org/onap/policy/controlloop/actor/so/SoOperation.java | 6 +++--- .../java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java | 2 +- .../java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoOperation.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoOperation.java index 9020c0b35..e3328e976 100644 --- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoOperation.java +++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoOperation.java @@ -89,7 +89,7 @@ public abstract class SoOperation extends HttpOperation { * @param config configuration for this operation * @param propertyNames names of properties required by this operation */ - public SoOperation(ControlLoopOperationParams params, HttpPollingConfig config, List propertyNames) { + protected SoOperation(ControlLoopOperationParams params, HttpPollingConfig config, List propertyNames) { super(params, config, SoResponse.class, propertyNames); this.modelCustomizationId = null; @@ -109,7 +109,7 @@ public abstract class SoOperation extends HttpOperation { * @param propertyNames names of properties required by this operation * @param targetEntityIds Target Entity information */ - public SoOperation(ControlLoopOperationParams params, HttpPollingConfig config, List propertyNames, + protected SoOperation(ControlLoopOperationParams params, HttpPollingConfig config, List propertyNames, Map targetEntityIds) { super(params, config, SoResponse.class, propertyNames); @@ -345,7 +345,7 @@ public abstract class SoOperation extends HttpOperation { * IllegalArgumentException if the desired data item is not found. */ - protected GenericVnf getVnfItem(SoModelInfo soModelInfo) { + protected GenericVnf getVnfItem() { return getRequiredProperty(OperationProperties.AAI_VNF, "generic VNF"); } diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java index f5c860e11..b778c10d7 100644 --- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java +++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java @@ -126,7 +126,7 @@ public class VfModuleCreate extends SoOperation { */ protected Pair makeRequest() { final SoModelInfo soModelInfo = prepareSoModelInfo(); - final GenericVnf vnfItem = getVnfItem(soModelInfo); + final GenericVnf vnfItem = getVnfItem(); final ServiceInstance vnfServiceItem = getServiceInstance(); final Tenant tenantItem = getDefaultTenant(); final CloudRegion cloudRegionItem = getDefaultCloudRegion(); diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java index 9adb62c83..b82444049 100644 --- a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java +++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java @@ -207,7 +207,7 @@ public class VfModuleDelete extends SoOperation { */ protected Pair makeRequest() { final SoModelInfo soModelInfo = prepareSoModelInfo(); - final GenericVnf vnfItem = getVnfItem(soModelInfo); + final GenericVnf vnfItem = getVnfItem(); final ServiceInstance vnfServiceItem = getServiceInstance(); final Tenant tenantItem = getDefaultTenant(); final CloudRegion cloudRegionItem = getDefaultCloudRegion(); -- cgit 1.2.3-korg