summaryrefslogtreecommitdiffstats
path: root/applications
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-06-19 14:24:31 -0400
committerJim Hahn <jrh3@att.com>2019-06-19 14:24:31 -0400
commitc6430ad773f18da97ab25e2d9e92a120fd55c482 (patch)
treefeb9953ce3571dd3ad19fe2b84abb5b566e7014f /applications
parent422fc737b0825d13bfd6a2acdd60226f61aab2c7 (diff)
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 <jrh3@att.com>
Diffstat (limited to 'applications')
-rw-r--r--applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/CoordinationGuardTranslator.java1
-rw-r--r--applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/LegacyGuardTranslator.java1
-rw-r--r--applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java1
3 files changed, 3 insertions, 0 deletions
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<String, Object> policyProps = toscaPolicy.getProperties();
LOGGER.debug("path = {}", coordinationFunctionPath);
LOGGER.debug("props = {}", policyProps);
+ @SuppressWarnings("unchecked")
List<String> controlLoop = (List<String>) 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);
diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java
index 9edf11dd..ee992907 100644
--- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java
+++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/CoordinationTest.java
@@ -70,6 +70,7 @@ public class CoordinationTest {
private static File propertiesFile;
private static XacmlApplicationServiceProvider service;
private static DecisionRequest requestCl1Node1;
+ @SuppressWarnings("unused")
private static DecisionRequest requestCl1Node2;
private static DecisionRequest requestCl2Node1;
private static DecisionRequest requestCl2Node2;