Address sonar issues in policy/models 45/116045/1
authorJim Hahn <jrh3@att.com>
Wed, 2 Dec 2020 19:41:19 +0000 (14:41 -0500)
committerJim Hahn <jrh3@att.com>
Wed, 2 Dec 2020 19:45:00 +0000 (14:45 -0500)
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 <jrh3@att.com>
models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoOperation.java
models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleCreate.java
models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/VfModuleDelete.java

index 9020c0b..e3328e9 100644 (file)
@@ -89,7 +89,7 @@ public abstract class SoOperation extends HttpOperation<SoResponse> {
      * @param config configuration for this operation
      * @param propertyNames names of properties required by this operation
      */
-    public SoOperation(ControlLoopOperationParams params, HttpPollingConfig config, List<String> propertyNames) {
+    protected SoOperation(ControlLoopOperationParams params, HttpPollingConfig config, List<String> propertyNames) {
         super(params, config, SoResponse.class, propertyNames);
 
         this.modelCustomizationId = null;
@@ -109,7 +109,7 @@ public abstract class SoOperation extends HttpOperation<SoResponse> {
      * @param propertyNames names of properties required by this operation
      * @param targetEntityIds Target Entity information
      */
-    public SoOperation(ControlLoopOperationParams params, HttpPollingConfig config, List<String> propertyNames,
+    protected SoOperation(ControlLoopOperationParams params, HttpPollingConfig config, List<String> propertyNames,
                        Map<String, String> targetEntityIds) {
         super(params, config, SoResponse.class, propertyNames);
 
@@ -345,7 +345,7 @@ public abstract class SoOperation extends HttpOperation<SoResponse> {
      * IllegalArgumentException if the desired data item is not found.
      */
 
-    protected GenericVnf getVnfItem(SoModelInfo soModelInfo) {
+    protected GenericVnf getVnfItem() {
         return getRequiredProperty(OperationProperties.AAI_VNF, "generic VNF");
     }
 
index f5c860e..b778c10 100644 (file)
@@ -126,7 +126,7 @@ public class VfModuleCreate extends SoOperation {
      */
     protected Pair<String, SoRequest> 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();
index 9adb62c..b824440 100644 (file)
@@ -207,7 +207,7 @@ public class VfModuleDelete extends SoOperation {
      */
     protected Pair<String, SoRequest> 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();