aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-29 17:12:06 -0400
committerJim Hahn <jrh3@att.com>2021-06-29 17:12:45 -0400
commit38a0a3888dc752bc6f88bdcc3477d20e38aeed3f (patch)
treefe08ebfec5507ed452ba958f8efacbd1b38da6ea
parentfa94acef1c8e67c05d9141016f8ae6ec9dc2d300 (diff)
Fix sonars in pap
Fixed: - indentation - use isEmpty() - use isZero() Issue-ID: POLICY-3287 Change-Id: Idcfba3a6839a47c3136fca8500128990ed64dcb1 Signed-off-by: Jim Hahn <jrh3@att.com>
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployControllerV1.java4
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/comm/PdpModifyRequestMapTest.java4
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<PdpSubGroup> 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);