[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-commit] r2472 - in jetty/branches/jetty-8/jetty-server/src: main/java/org/eclipse/jetty/server/handler test/java/org/eclipse/jetty/server/handler

Author: djencks
Date: 2010-11-05 21:34:54 -0400 (Fri, 05 Nov 2010)
New Revision: 2472

Modified:
   jetty/branches/jetty-8/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
   jetty/branches/jetty-8/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java
Log:
Bug 329602 only doStop clears ServletContext attributes.  Test modified to verify this

Modified: jetty/branches/jetty-8/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
===================================================================
--- jetty/branches/jetty-8/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java	2010-11-05 17:54:47 UTC (rev 2471)
+++ jetty/branches/jetty-8/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java	2010-11-06 01:34:54 UTC (rev 2472)
@@ -576,7 +576,6 @@
         Thread current_thread=null;
         Context old_context=null;
 
-        _contextAttributes.clearAttributes();
         try
         {
             // Set the classloader

Modified: jetty/branches/jetty-8/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java
===================================================================
--- jetty/branches/jetty-8/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java	2010-11-05 17:54:47 UTC (rev 2471)
+++ jetty/branches/jetty-8/jetty-server/src/test/java/org/eclipse/jetty/server/handler/ContextHandlerTest.java	2010-11-06 01:34:54 UTC (rev 2472)
@@ -167,7 +167,7 @@
         handler.setAttribute("ccc","333");
         handler.getServletContext().setAttribute("ddd","444");
         assertEquals("111",handler.getServletContext().getAttribute("aaa"));
-        assertEquals(null,handler.getServletContext().getAttribute("bbb"));
+        assertEquals("222",handler.getServletContext().getAttribute("bbb"));
         handler.getServletContext().setAttribute("bbb","222");
         assertEquals("333",handler.getServletContext().getAttribute("ccc"));
         assertEquals("444",handler.getServletContext().getAttribute("ddd"));