]> source.dussan.org Git - gitblit.git/commitdiff
Remove Dagger injector from the servlet context instead of nulling it
authorJames Moger <james.moger@gitblit.com>
Wed, 5 Mar 2014 13:20:36 +0000 (08:20 -0500)
committerJames Moger <james.moger@gitblit.com>
Wed, 5 Mar 2014 13:20:36 +0000 (08:20 -0500)
src/main/java/com/gitblit/dagger/DaggerContext.java

index 28ee25d35e189fccbc7ffb1ec6f4b230c0079a36..0e6a3fc42410425cd6fdc4408647afe93ab83a26 100644 (file)
@@ -61,7 +61,7 @@ public abstract class DaggerContext implements ServletContextListener {
        @Override
        public final void contextDestroyed(ServletContextEvent contextEvent) {
                ServletContext context = contextEvent.getServletContext();
-               context.setAttribute(INJECTOR_NAME, null);
+               context.removeAttribute(INJECTOR_NAME);
                destroyContext(context);
        }
 }