Skip to content

Commit

Permalink
Issue #5032 - Don't wrap if there is no ServletContextHandler
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Sep 15, 2020
1 parent 30caaba commit 439d3f9
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -419,9 +419,13 @@ public void initialize()
private Servlet wrap(final Servlet servlet)
{
Servlet ret = servlet;
for (ServletHolder.WrapperFunction wrapperFunction : getServletHandler().getServletContextHandler().getBeans(ServletHolder.WrapperFunction.class))
ServletContextHandler contextHandler = getServletHandler().getServletContextHandler();
if (contextHandler != null)
{
ret = wrapperFunction.wrapServlet(ret);
for (ServletHolder.WrapperFunction wrapperFunction : getServletHandler().getServletContextHandler().getBeans(ServletHolder.WrapperFunction.class))
{
ret = wrapperFunction.wrapServlet(ret);
}
}
return ret;
}
Expand Down

0 comments on commit 439d3f9

Please sign in to comment.