From: Jim Hahn Date: Thu, 9 Apr 2020 14:05:08 +0000 (-0400) Subject: Remaining sonar issues in pap X-Git-Tag: 2.2.1~4 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=4e716dd24d0fce3149698419927feb8d7833274b;p=policy%2Fpap.git Remaining sonar issues in pap Addressed these remaining sonar issues: - main arg validation - TODO item regarding subgroup updates with no PDPs - after discussion, it was decided to not do this Issue-ID: POLICY-2305 Change-Id: Ib2b340d029679d6cd2b2a558318b25d38b830833 Signed-off-by: Jim Hahn --- diff --git a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java index ed77a437..4c0accd3 100644 --- a/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java +++ b/main/src/main/java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java @@ -263,8 +263,6 @@ public class PdpGroupDeployProvider extends ProviderBase { } - // TODO add code to ensure that dbsub has at least one PDP instance if policies is not empty - Set pdps = dbsub.getPdpInstances().stream().map(Pdp::getInstanceId).collect(Collectors.toSet()); for (ToscaPolicyIdentifier policyId : deployed) { diff --git a/main/src/main/java/org/onap/policy/pap/main/startstop/Main.java b/main/src/main/java/org/onap/policy/pap/main/startstop/Main.java index fc3ebbce..1f478d77 100644 --- a/main/src/main/java/org/onap/policy/pap/main/startstop/Main.java +++ b/main/src/main/java/org/onap/policy/pap/main/startstop/Main.java @@ -156,7 +156,11 @@ public class Main { * * @param args the arguments */ - public static void main(final String[] args) { + public static void main(final String[] args) { // NOSONAR + /* + * NOTE: arguments are validated by the constructor, thus sonar is disabled. + */ + new Main(args); } }