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%2FDecisionPolicyDictionaryController.java;h=5792cba81395b18e50f3cfd13d370f9d20ef2781;hb=0c8425b25c093f638351a14f84a7b1df731cd0de;hp=f4e32ebea0d2d9a8b3effd6c035fa4920e2f709c;hpb=ebc9e66ae4b4cc5a74e7355a8622b3c50a111bf7;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DecisionPolicyDictionaryController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DecisionPolicyDictionaryController.java index f4e32ebea..5792cba81 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DecisionPolicyDictionaryController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DecisionPolicyDictionaryController.java @@ -23,6 +23,7 @@ package org.onap.policy.pap.xacml.rest.controller; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; + import org.json.JSONObject; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; @@ -32,6 +33,7 @@ import org.onap.policy.rest.jpa.Datatype; import org.onap.policy.rest.jpa.DecisionSettings; import org.onap.policy.rest.jpa.RainyDayTreatments; import org.onap.policy.rest.jpa.UserInfo; +import org.onap.policy.utils.PolicyUtils; import org.onap.policy.xacml.api.XACMLErrorConstants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; @@ -41,6 +43,7 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + import java.io.IOException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; @@ -208,7 +211,7 @@ public class DecisionPolicyDictionaryController { response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -238,7 +241,7 @@ public class DecisionPolicyDictionaryController { response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -376,7 +379,7 @@ public class DecisionPolicyDictionaryController { response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -406,7 +409,7 @@ public class DecisionPolicyDictionaryController { response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; }