Fixed the Policy API issues and Bugfixes
[policy/engine.git] / ECOMP-PAP-REST / src / main / java / org / openecomp / policy / pap / xacml / rest / components / CreateBrmsRawPolicy.java
index 350bbc4..a0f13ec 100644 (file)
@@ -131,13 +131,9 @@ public class CreateBrmsRawPolicy extends Policy {
                Path newPolicyPath = null;
                newPolicyPath = Paths.get(policyAdapter.getNewFileName());
                
-               Boolean dbIsUpdated = true;
-
-               successMap = new HashMap<String, String>();
-               if (dbIsUpdated) {
-                       successMap = createPolicy(newPolicyPath,
-                                       getCorrectPolicyDataObject());
-               } else {
+               successMap = createPolicy(newPolicyPath, getCorrectPolicyDataObject());
+               if (successMap == null) {
+                       successMap = new HashMap<>();
                        PolicyLogger.error("Failed to Update the Database Dictionary Tables.");
                        successMap.put("error", "DB UPDATE");
                }