diff options
author | 2017-08-22 18:13:11 +0530 | |
---|---|---|
committer | 2017-08-24 11:28:09 +0530 | |
commit | 7925630b5edc79119f29392edc6ddc84cf7c3757 (patch) | |
tree | b99b3e1d5b0c5b7058d3f7c66b778a2c4291f2ad /ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl | |
parent | c53fa990ea27ec074859eb94bcb7ec6deaa2157b (diff) |
Sonar fix forONAP-PAP-REST critical sonar issues
Policy engine code cleanup for fixing exceptions, logger stream
requirements.
Change-Id: If641478dff698830d89ff4bb6ef8c698733ba0a6
Issue-Id: [POLICY-174]
Signed-off-by: AvinashS <avinash.s@huawei.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl')
-rw-r--r-- | ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java | 6 |
1 files changed, 3 insertions, 3 deletions
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 7b50397ca..e6514469c 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 @@ -28,6 +28,7 @@ import javax.script.SimpleBindings; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.Criteria; +import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; @@ -251,9 +252,8 @@ public class CommonClassDaoImpl implements CommonClassDao{ }finally{ try{ session.close(); - }catch(Exception e1){ - LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Error While Closing Connection/Statement"+e1); - throw e1; + }catch(HibernateException e1){ + LOGGER.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Error While Closing Connection/Statement",e1); } } return data; |