X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ECOMP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcomponents%2FFirewallConfigPolicy.java;h=9e590732c95742646c1a982142d9b2cc64acac98;hp=509da0b6156673a06e5ce2086acb5ca45c59cbcb;hb=7e547eaa55920dfbc9691eab33bb728395b50cf2;hpb=dda032f8bb161d54eb1f59de2b4a3efb774fc4d1 diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java index 509da0b61..9e590732c 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/components/FirewallConfigPolicy.java @@ -114,7 +114,7 @@ public class FirewallConfigPolicy extends Policy { LOGGER.debug("Configuration is succesfully saved"); } } catch (IOException e) { - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } } @@ -372,7 +372,10 @@ public class FirewallConfigPolicy extends Policy { assignment2.setCategory(CATEGORY_RESOURCE); assignment2.setIssuer(""); AttributeValueType AttributeValue = new AttributeValueType(); - AttributeValue.setDataType(URI_DATATYPE); + AttributeValue.setDataType(URI_DATATYPE); + if (policyName.endsWith(".xml")) { + policyName = policyName.substring(0, policyName.lastIndexOf(".xml")); + } String content = CONFIG_URL + "/Config/" + policyName + ".json"; AttributeValue.getContent().add(content); @@ -1588,10 +1591,10 @@ public class FirewallConfigPolicy extends Policy { JsonNode updatedJason = null; try { - oldJason = JsonLoader.fromString(oldJson); - updatedJason = JsonLoader.fromString(json); + oldJason = JsonLoader.fromString(oldJson); + updatedJason = JsonLoader.fromString(json); } catch (IOException e) { - e.printStackTrace(); + LOGGER.error("Exception Occured"+e); } JsonPatch jsonPatch = JsonDiff.asJsonPatch(oldJason, updatedJason);