From c50d82d632a2a4d70499e69f0646534403de69fd Mon Sep 17 00:00:00 2001 From: ramverma Date: Fri, 14 Sep 2018 15:20:55 +0100 Subject: Fix sonar bugs in distribution Change-Id: I20c1246efc3ce0ad6d874e6a0b5c8230c96b9425 Issue-ID: POLICY-1035 Signed-off-by: ramverma --- .../distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java | 4 +++- .../distribution/reception/decoding/pdpx/PolicyDecoderToscaPdpx.java | 4 +++- .../reception/statistics/DistributionStatisticsManager.java | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java index 4585ce73..03f0c041 100644 --- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderCsarPdpx.java @@ -87,5 +87,7 @@ public class PolicyDecoderCsarPdpx implements PolicyDecoder { } @Override - public void configure(final String parameterGroupName) {} + public void configure(final String parameterGroupName) { + throw new UnsupportedOperationException("The method is not supprted"); + } } diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderToscaPdpx.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderToscaPdpx.java index 40b33359..41793ebf 100644 --- a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderToscaPdpx.java +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/decoding/pdpx/PolicyDecoderToscaPdpx.java @@ -44,6 +44,8 @@ public class PolicyDecoderToscaPdpx implements PolicyDecoder } @Override - public void configure(final String parameterGroupName) {} + public void configure(final String parameterGroupName) { + throw new UnsupportedOperationException("The method is not supprted"); + } } diff --git a/reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java b/reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java index cd78d254..3b66ee17 100644 --- a/reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java +++ b/reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java @@ -34,6 +34,10 @@ public class DistributionStatisticsManager { private static long downloadSuccessCount; private static long downloadFailureCount; + private DistributionStatisticsManager() { + throw new IllegalStateException("Instantiation of the class is not allowed"); + } + /** * Method to update the total distribution count. * -- cgit 1.2.3-korg