Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UNDERTOW-1762] Error page for custom exception-type is not is not displayed in jsp development mode #917

Merged
merged 2 commits into from
Aug 24, 2020

Conversation

aogburn
Copy link
Contributor

@aogburn aogburn commented Jul 30, 2020

@spyrkob
Copy link
Contributor

spyrkob commented Aug 13, 2020

This causes a failing TCK test: https://github.com/eclipse-ee4j/jakartaee-tck/blob/8.0.2/src/com/sun/ts/tests/servlet/spec/errorpage1/URLClient.java#L101 The problem is when a custom exception extending ServletException is wrapped in ServletException and that custom exception is used in mapping.

Maybe the mapping check should be performed for each level of unwrap?

@aogburn
Copy link
Contributor Author

aogburn commented Aug 13, 2020

Ah, yes, made an adjustment to fix that.

@fl4via fl4via added bug fix Contains bug fix(es) next release This PR will be merged before next release or has already been merged (for payload double check) labels Aug 24, 2020
rootCause = ((ServletException) rootCause).getRootCause();
}
if (rootCause != null) {
if (rootCause != null && location == null) {
for (Class c = rootCause.getClass(); c != null && location == null; c = c.getSuperclass()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to check for location equals null any longer because of the change in the previous line

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aogburn I'll take the freedom to update the PR myself because I'm working on releasing and tagging Undertow with this fix. Thanks for your PR!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aogburn never mind, my bad, this code is actually correct and does not need to be updated

@fl4via fl4via merged commit c64f1db into undertow-io:master Aug 24, 2020
@fl4via fl4via removed the next release This PR will be merged before next release or has already been merged (for payload double check) label Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Contains bug fix(es)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants