Cleanup ThreadContext in finally-clause#294
Conversation
|
Hi @jgogstad, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
|
Thanks for contributing the solution. I understand the issue you are reporting but I'm concerned that the proposed code may have an issue as well. |
| @@ -181,10 +182,6 @@ private boolean invokeSafeOnBeginRequest(ServletRequest req, ServletResponse res | |||
| private void invokeSafeOnEndRequest(ServletRequest req, ServletResponse res) { | |||
| try { | |||
| webModulesContainer.invokeOnEndRequest(req, res); | |||
There was a problem hiding this comment.
This call invokes the modules' onEndRequest method which uses the TLS. After cleanup above, the TLS would no longer be available
…Request on application exceptions.
|
True, sorry for the lack of proper testing on my part. Pushed a fix that also addresses #298. I restructured the conditionals a bit in order to make the exception handling more readable. As long as you're targeting JRE 1.6, we can't collapse the catch-blocks so the code is duplicated. |
|
Thanks for the fix! |
Fixes #292