diff options
author | 2017-08-24 11:13:30 +0000 | |
---|---|---|
committer | 2017-08-24 11:13:30 +0000 | |
commit | 6f2b3f2dd0e80895acd0f77aa5784e717be33696 (patch) | |
tree | 121317a88f00af85bfccc9a521158384d0103343 /ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java | |
parent | 7ea81288603904f0cb6f57936da44d6a3dd521a6 (diff) | |
parent | 7925630b5edc79119f29392edc6ddc84cf7c3757 (diff) |
Merge "Sonar fix forONAP-PAP-REST critical sonar issues"
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java')
-rw-r--r-- | ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java index d88aee0cb..3864ba1fd 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java @@ -26,7 +26,8 @@ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.ParserConfigurationException; - +import org.onap.policy.common.logging.flexlogger.FlexLogger; +import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.common.logging.eelf.PolicyLogger; import org.onap.policy.pap.xacml.rest.XACMLPapServlet; import org.onap.policy.pap.xacml.rest.policycontroller.PolicyCreation; @@ -39,6 +40,7 @@ import org.xml.sax.SAXException; import com.att.research.xacml.util.XACMLProperties; public class SavePolicyHandler { + private static final Logger logger = FlexLogger.getLogger(SavePolicyHandler.class); private HashMap<String, String> ErrorHeaders = null; public void doPolicyAPIPut(HttpServletRequest request, HttpServletResponse response) throws IOException { @@ -77,8 +79,7 @@ public class SavePolicyHandler { response.addHeader("operation", "create"); } } catch (Exception e1) { - PolicyLogger.error(XACMLErrorConstants.ERROR_UNKNOWN + - "Could not set data to policy adapter "+ e1.getMessage()); + logger.error("Could not set data to policy adapter "+e1.getMessage(),e1); } } } @@ -150,7 +151,7 @@ public class SavePolicyHandler { SavePolicyHandler instance = (SavePolicyHandler) savePolicyHandler.newInstance(); return instance; } catch (Exception e) { - PolicyLogger.error(e.getMessage()); + logger.error(e.getMessage(),e); } return null; } |