Merge "Testing documentation commit with header fix"
[policy/engine.git] / ONAP-PAP-REST / src / main / java / org / onap / policy / pap / xacml / rest / components / PolicyDBDao.java
index bf632f1..483418c 100644 (file)
@@ -796,7 +796,7 @@ public class PolicyDBDao {
                        //set default if it should be
                        if(!localGroupClone.isDefaultGroup() && groupRecord.isDefaultGroup()){
                                try {
-                                       papEngine.SetDefaultGroup(localGroup);
+                                       papEngine.setDefaultGroup(localGroup);
                                        return;
                                } catch (PAPException e) {
                                        PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "PolicyDBDao", "Caught PAPException trying to set default group with papEngine.SetDefaultGroup("+localGroupClone+");");
@@ -2156,7 +2156,7 @@ public class PolicyDBDao {
                                String prefix = null;
                                if (policy.policyAdapter.getPolicyType().equalsIgnoreCase("Config")) {
 
-                                       prefix = configPath.substring(configPath.indexOf(policyScope+".")+policyScope.concat(".").length(), configPath.indexOf(policy.policyAdapter.getPolicyName()));
+                                       prefix = configPath.substring(configPath.indexOf(policyScope+".")+policyScope.concat(".").length(), configPath.lastIndexOf(policy.policyAdapter.getPolicyName()));
                                        if(isNullOrEmpty(policy.policyAdapter.getConfigBodyData())){
                                                String configData = "";
                                                try{