From 612196451afe9b16b8914858dd58f3bb0dae8579 Mon Sep 17 00:00:00 2001 From: ramverma Date: Thu, 16 Aug 2018 16:43:20 +0100 Subject: Adding termination code changes for distribution * Code changes for terminating the handlers started by distribution activator. * More test cases to increase coverage. * Fixes for checkstyle issues. * Fixes for sonar issues. Change-Id: I3299317c83fa643ac1d0ba1105ac1a932c0a83f6 Issue-ID: POLICY-1035 Signed-off-by: ramverma --- forwarding/pom.xml | 5 +++++ .../forwarding/parameters/PolicyForwarderParameters.java | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'forwarding') diff --git a/forwarding/pom.xml b/forwarding/pom.xml index 6a7b123a..830f3724 100644 --- a/forwarding/pom.xml +++ b/forwarding/pom.xml @@ -42,5 +42,10 @@ common-parameters 1.3.0-SNAPSHOT + + org.onap.policy.common + ONAP-Logging + 1.3.0-SNAPSHOT + diff --git a/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java b/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java index 3bde5009..57d04248 100644 --- a/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java +++ b/forwarding/src/main/java/org/onap/policy/distribution/forwarding/parameters/PolicyForwarderParameters.java @@ -20,6 +20,8 @@ package org.onap.policy.distribution.forwarding.parameters; +import org.onap.policy.common.logging.flexlogger.FlexLogger; +import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.common.parameters.GroupValidationResult; import org.onap.policy.common.parameters.ParameterGroup; import org.onap.policy.common.parameters.ValidationStatus; @@ -30,6 +32,9 @@ import org.onap.policy.common.parameters.ValidationStatus; * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com) */ public class PolicyForwarderParameters implements ParameterGroup { + + private static final Logger LOGGER = FlexLogger.getLogger(PolicyForwarderParameters.class); + private String forwarderType; private String forwarderClassName; @@ -89,7 +94,8 @@ public class PolicyForwarderParameters implements ParameterGroup { private void validatePolicyForwarderClass(final GroupValidationResult validationResult) { try { Class.forName(forwarderClassName); - } catch (final ClassNotFoundException e) { + } catch (final ClassNotFoundException exp) { + LOGGER.error("policy forwarder class not found in classpath", exp); validationResult.setResult("forwarderClassName", ValidationStatus.INVALID, "policy forwarder class not found in classpath"); } -- cgit 1.2.3-korg