486530 - Handler added to WebAppContext prevents ServletContext initialization

Fixed needless warnings during destroy
This commit is contained in:
Greg Wilkins 2016-04-28 15:17:28 +10:00
parent a377b3a8f3
commit d38bdb6e7c
1 changed files with 2 additions and 1 deletions

View File

@ -178,7 +178,8 @@ public class ServletContextHandler extends ContextHandler
@Override
public void setHandler(Handler handler)
{
LOG.warn("ServletContextHandler.setHandler should not be called directly. Use insertHandler or setSessionHandler etc.");
if (handler!=null)
LOG.warn("ServletContextHandler.setHandler should not be called directly. Use insertHandler or setSessionHandler etc.");
super.setHandler(handler);
}