From c6430ad773f18da97ab25e2d9e92a120fd55c482 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 19 Jun 2019 14:24:31 -0400 Subject: Update totalPoliciesCount statistic Modified the code to set the policy count statistic at start-up and whenever the policy list is changed. Also fixed a couple of checkstyle issues in guard. Change-Id: I92017fe64cd5d19c36908347193cc21d183f051e Issue-ID: POLICY-1844 Signed-off-by: Jim Hahn --- .../policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java | 1 + .../onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java | 1 + 2 files changed, 2 insertions(+) (limited to 'applications/guard/src/main/java/org') diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java index 41c1428e..a93e2811 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java @@ -72,6 +72,7 @@ public class CoordinationGuardTranslator implements ToscaPolicyTranslator { Map policyProps = toscaPolicy.getProperties(); LOGGER.debug("path = {}", coordinationFunctionPath); LOGGER.debug("props = {}", policyProps); + @SuppressWarnings("unchecked") List controlLoop = (List) policyProps.get("controlLoop"); CoordinationDirective cd = new CoordinationDirective(); cd.setCoordinationFunction(type); diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java index 2917aab2..932db959 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java @@ -766,6 +766,7 @@ public class LegacyGuardTranslator implements ToscaPolicyTranslator { return theInt; } + @SuppressWarnings("unused") private static AdviceExpressionsType generateRequestIdAdvice() { AdviceExpressionType adviceExpression = new AdviceExpressionType(); adviceExpression.setAppliesTo(EffectType.PERMIT); -- cgit 1.2.3-korg