Eric Norman created SLING-10615: ----------------------------------- Summary: DefaultErrorHandlerServlet json error response may throw a ClassCastException Key: SLING-10615 URL: https://issues.apache.org/jira/browse/SLING-10615 Project: Sling Issue Type: Bug Reporter: Eric Norman Assignee: Eric Norman Fix For: Servlets Resolver 2.8.0
The DefaultErrorHandlerServlet json error response will fail with a ClassCastException if the "javax.servlet.error.exception_type" request attribute is not a String object. There is some inconsistency in what type of object the "javax.servlet.error.exception_type" should be in the error handler. * The servlet 3.1 specifications states that this attribute should be a "java.lang.Class" object. * The SlingConstants#ERROR_EXCEPTION_TYPE javadoc states that this attribute should be a "java.lang.String" object. In the interest of backward compatibility, the DefaultErrorHandlerServlet should try to handle it if the attribute value is either a String or a Class object. -- This message was sent by Atlassian Jira (v8.3.4#803005)