aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-08-24 08:13:53 +0000
committerGuo Ruijing <ruijing.guo@intel.com>2017-08-24 08:27:56 +0000
commitd3b395408111f444da77eb8b1db8b5e008a287de (patch)
treec02ce7c35ddf1017ab039e2b5d96d7f732fc4f88 /ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java
parent7ea81288603904f0cb6f57936da44d6a3dd521a6 (diff)
Fix critical sonar for ONAP-PAP-REST
This patch is to fix error-handling sonar issue for ONAP-PAP-REST. Change-Id: Ic5755cc02f282938d098c3a5c9e869318429c2c6 Issue-Id: POLICY-174 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java9
1 files changed, 6 insertions, 3 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 98c8137de..d2ed1ad51 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
@@ -212,7 +212,7 @@ public class PolicyDBDao {
} catch(Exception e){
PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "PolicyDBDao", "Exception querying for other registered PolicyDBDaos");
- logger.warn("List of remote PolicyDBDaos will be empty");
+ logger.warn("List of remote PolicyDBDaos will be empty", e);
}
try{
em.getTransaction().commit();
@@ -220,7 +220,7 @@ public class PolicyDBDao {
try{
em.getTransaction().rollback();
} catch(Exception e2){
-
+ logger.debug("List of remote PolicyDBDaos will be empty", e2);
}
}
em.close();
@@ -500,6 +500,7 @@ public class PolicyDBDao {
ourUrl = splitPapUrlUserPass((String)o)[0];
}catch(Exception e){
ourUrl = o;
+ logger.debug(e);
}
if(o == null){
o = "undefined";
@@ -867,6 +868,7 @@ public class PolicyDBDao {
}
} catch(Exception e){
nameAndVersion[0] = originalPolicyName;
+ logger.debug(e);
}
try{
nameAndVersion[1] = policyName.substring(policyName.lastIndexOf('.')+1);
@@ -875,6 +877,7 @@ public class PolicyDBDao {
}
} catch(Exception e){
nameAndVersion[1] = "1";
+ logger.debug(e);
}
return nameAndVersion;
}
@@ -2795,4 +2798,4 @@ public class PolicyDBDao {
}
}
-} \ No newline at end of file
+}