diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2022-02-11 08:53:57 +0000 |
---|---|---|
committer | Ramesh Murugan Iyer <ramesh.murugan.iyer@est.tech> | 2022-02-11 09:29:32 +0000 |
commit | fca2e06f2a01c03ba0d12271defaec0b5ab13ba5 (patch) | |
tree | 6e5d98e874d17fe982e619077a3949c10321b683 /applications/guard/src/main/java | |
parent | d8ed7a991d54bd6e53a7c1fedee808ab78dfdf19 (diff) |
Fix xacml pdp to accommodate Object values in policy metadata
Issue-ID: POLICY-3832
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I276bf28d3fdaad6e1d7cde315cdb049343cbde3f
Diffstat (limited to 'applications/guard/src/main/java')
-rw-r--r-- | applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java index 3aae5fc4..45caf21c 100644 --- a/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java +++ b/applications/guard/src/main/java/org/onap/policy/xacml/pdp/application/guard/GuardTranslator.java @@ -129,7 +129,7 @@ public class GuardTranslator implements ToscaPolicyTranslator { // // Policy name should be at the root // - String policyName = toscaPolicy.getMetadata().get("policy-id"); + String policyName = String.valueOf(toscaPolicy.getMetadata().get("policy-id")); // // Set it as the policy ID // @@ -275,14 +275,14 @@ public class GuardTranslator implements ToscaPolicyTranslator { * @param map The Metadata TOSCA Map * @return Same Policy Object */ - protected PolicyType fillMetadataSection(PolicyType policy, Map<String, String> map) { + protected PolicyType fillMetadataSection(PolicyType policy, Map<String, Object> map) { // // NOTE: The models code ensures the metadata section ALWAYS exists // // // Add in the Policy Version // - policy.setVersion(map.get("policy-version")); + policy.setVersion(String.valueOf(map.get("policy-version"))); return policy; } |