summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java
diff options
context:
space:
mode:
authorTej, Tarun <tt3868@att.com>2017-09-19 23:14:33 -0400
committerTej, Tarun <tt3868@att.com>2017-09-20 00:12:17 -0400
commit98ab70838379e3e00a5596fdb32de81a814e2247 (patch)
tree65e379a54d08684cefb17f5c79140432dc9964fd /ONAP-PAP-REST/src/main/java
parente64508463caed53e661e4e02e1de971b21f642a7 (diff)
mysql connector to mariadb changes
changes to mysql connector to mariadb connector along with additional Junits Issue-Id: POLICY-219 Change-Id: I26ee1cf733d49d10fccbcd159fe8fc380120efbf Signed-off-by: Tej, Tarun <tt3868@att.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java2
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java
index 7c46990ab..483418c59 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java
@@ -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{
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java
index e6514469c..5d2b7f6c7 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java
@@ -448,4 +448,8 @@ public class CommonClassDaoImpl implements CommonClassDao{
return null;
}
+ public static void setSessionfactory(SessionFactory sessionfactory) {
+ sessionFactory = sessionfactory;
+ }
+
} \ No newline at end of file