X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fadmin%2FPolicyManagerServlet.java;fp=POLICY-SDK-APP%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fadmin%2FPolicyManagerServlet.java;h=b28850dd72910e3a3d0cc8e30bd8b90fa86858e4;hb=dbb838a594fde49ca337900e42a6e9b56bb2b60b;hp=4d549fea2fc192310aafe2c6aa9f96b01e3df4b5;hpb=0e75793d9c09b31b783556212380bb112f50219a;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java index 4d549fea2..b28850dd7 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java @@ -530,16 +530,15 @@ public class PolicyManagerServlet extends HttpServlet { } try (BufferedWriter bw = new BufferedWriter(new FileWriter(temp))) { bw.write(entity.getPolicyData()); - object = HumanPolicyComponent.DescribePolicy(temp); } catch (IOException e) { LOGGER.error("Exception Occured while Describing the Policy"+e); - }finally{ - if(temp != null){ - try { - Files.delete(temp.toPath()); - } catch (IOException e) { - LOGGER.warn("Failed to delete " + temp.getName() + e); - } + } + object = HumanPolicyComponent.DescribePolicy(temp); + if(temp != null){ + try { + Files.delete(temp.toPath()); + } catch (IOException e) { + LOGGER.warn("Failed to delete " + temp.getName() + e); } } return object;