From 38a0a3888dc752bc6f88bdcc3477d20e38aeed3f Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Tue, 29 Jun 2021 17:12:06 -0400 Subject: Fix sonars in pap Fixed: - indentation - use isEmpty() - use isZero() Issue-ID: POLICY-3287 Change-Id: Idcfba3a6839a47c3136fca8500128990ed64dcb1 Signed-off-by: Jim Hahn --- .../org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java | 4 ++-- .../java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java index fe2d8170..7357771d 100644 --- a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java +++ b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java @@ -100,7 +100,7 @@ public class PdpGroupDeployControllerV1 extends PapRestControllerV1 { @HeaderParam(REQUEST_ID_NAME) @ApiParam(REQUEST_ID_PARAM_DESCRIPTION) UUID requestId, @ApiParam(value = "List of PDP Group Deployments", required = true) DeploymentGroups groups) { return doOperation(requestId, "update policy deployments failed", - () -> provider.updateGroupPolicies(groups, getPrincipal())); + () -> provider.updateGroupPolicies(groups, getPrincipal())); } /** @@ -144,7 +144,7 @@ public class PdpGroupDeployControllerV1 extends PapRestControllerV1 { public Response deployPolicies(@HeaderParam(REQUEST_ID_NAME) @ApiParam(REQUEST_ID_PARAM_DESCRIPTION) UUID requestId, @ApiParam(value = "PDP Policies; only the name is required", required = true) PdpDeployPolicies policies) { return doOperation(requestId, "deploy policies failed", - () -> provider.deployPolicies(policies, getPrincipal())); + () -> provider.deployPolicies(policies, getPrincipal())); } /** diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java index fd5ff86e..27c01e18 100644 --- a/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java @@ -392,8 +392,8 @@ public class PdpModifyRequestMapTest extends CommonRequestBase { final Iterator iter = group2.getPdpSubgroups().iterator(); PdpSubGroup subgrp = iter.next(); - assertThat(subgrp.getPdpInstances()).hasSize(0); - assertThat(subgrp.getCurrentInstanceCount()).isEqualTo(0); + assertThat(subgrp.getPdpInstances()).isEmpty(); + assertThat(subgrp.getCurrentInstanceCount()).isZero(); subgrp = iter.next(); assertThat(subgrp.getPdpInstances()).hasSize(1); -- cgit 1.2.3-korg