From f26af79d387361a3de9f1c709ed30c2c4e7b4794 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 12 May 2021 20:46:43 +1000 Subject: [PATCH] Fix #3764 DeprecationWarning decorator Add in doStart Signed-off-by: Greg Wilkins --- .../java/org/eclipse/jetty/servlet/ServletContextHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java index d420675241b..aa7efd66a83 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletContextHandler.java @@ -175,7 +175,6 @@ public class ServletContextHandler extends ContextHandler _servletHandler = servletHandler; _objFactory = new DecoratedObjectFactory(); - _objFactory.addDecorator(new DeprecationWarning()); // Link the handlers relinkHandlers(); @@ -302,6 +301,7 @@ public class ServletContextHandler extends ContextHandler @Override protected void doStart() throws Exception { + _objFactory.addDecorator(new DeprecationWarning()); getServletContext().setAttribute(DecoratedObjectFactory.ATTR, _objFactory); super.doStart(); }