Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
smthing committed Aug 12, 2024
1 parent 1446d79 commit 354d2f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private void initFilter(DeploymentInfo deploymentInfo) throws Exception {

public void stop() {
plugins.forEach(plugin -> plugin.willStopContainer(this));
deploymentInfo.getServlets().values().forEach(servletInfo -> servletInfo.getServlet().destroy());
deploymentInfo.getServlets().values().stream().filter(ServletInfo::initialized).forEach(servletInfo -> servletInfo.getServlet().destroy());
ServletContextEvent event = deploymentInfo.getServletContextListeners().isEmpty() ? null : new ServletContextEvent(servletContext);
deploymentInfo.getServletContextListeners().forEach(servletContextListener -> servletContextListener.getListener().contextDestroyed(event));

Expand Down

0 comments on commit 354d2f4

Please sign in to comment.