X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FEnforcerDictionaryController.java;h=9e248bf62175a4139bc4a7303b4018b1abd819dc;hb=7f09be3758d5797c22682686bad9281516cfe5a1;hp=6c5d3a9e3a831ddb45e1492307444e45acfe351a;hpb=7925630b5edc79119f29392edc6ddc84cf7c3757;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/EnforcerDictionaryController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/EnforcerDictionaryController.java index 6c5d3a9e3..9e248bf62 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/EnforcerDictionaryController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/EnforcerDictionaryController.java @@ -37,6 +37,7 @@ import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.pap.xacml.rest.util.JsonMessage; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.EnforcingType; +import org.onap.policy.utils.PolicyUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -56,7 +57,7 @@ public class EnforcerDictionaryController { CommonClassDao commonClassDao; @RequestMapping(value={"/get_EnforcerTypeData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE) - public void getEnforcerDictionaryEntityData(HttpServletRequest request, HttpServletResponse response){ + public void getEnforcerDictionaryEntityData(HttpServletResponse response){ try{ Map model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -104,7 +105,7 @@ public class EnforcerDictionaryController { response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); LOGGER.error(e); } return null; @@ -135,7 +136,7 @@ public class EnforcerDictionaryController { response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; }