From 4e716dd24d0fce3149698419927feb8d7833274b Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 9 Apr 2020 10:05:08 -0400 Subject: 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 --- .../java/org/onap/policy/pap/main/rest/PdpGroupDeployProvider.java | 2 -- main/src/main/java/org/onap/policy/pap/main/startstop/Main.java | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'main') 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); } } -- cgit 1.2.3-korg