[
https://issues.apache.org/jira/browse/SLING-10615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Norman resolved SLING-10615.
---------------------------------
Resolution: Fixed
No concerns were raised, so I merged the PR at:
[{{fc1d22f}}|https://github.com/apache/sling-org-apache-sling-servlets-resolver/commit/fc1d22f79c31aa2e6eb91ef12b21c4af386242de]
> 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
> Priority: Major
> Fix For: Servlets Resolver 2.8.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)