tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1198555 - in /tomcat/tc7.0.x/trunk/test/org/apache/catalina: core/ deploy/ filters/
Date Sun, 06 Nov 2011 21:06:46 GMT
Author: kkolinko
Date: Sun Nov  6 21:06:45 2011
New Revision: 1198555

URL: http://svn.apache.org/viewvc?rev=1198555&view=rev
Log:
Porting r1187806 - whitespace cleanup in /test

Modified:
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestDefaultInstanceManager.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextAliases.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestSecurityConstraint.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterResponse.java

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestDefaultInstanceManager.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestDefaultInstanceManager.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestDefaultInstanceManager.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestDefaultInstanceManager.java Sun Nov  6 21:06:45 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@ public class TestDefaultInstanceManager 
 
     @Test
     public void testClassUnloading() throws Exception {
-        
+
         DefaultInstanceManager instanceManager = doClassUnloadingPrep();
 
         // Request a JSP page (that doesn't load any tag libraries etc.)
@@ -39,13 +39,13 @@ public class TestDefaultInstanceManager 
         getUrl("http://localhost:" + getPort() + "/test/annotations.jsp");
         // Request a second JSP (again, no tag libraries etc.)
         getUrl("http://localhost:" + getPort() + "/test/bug36923.jsp");
-        
+
         // Check the number of classes in the cache
         int count = instanceManager.getAnnotationCacheSize();
 
         // Request a third JSP (again, no tag libraries etc.)
         getUrl("http://localhost:" + getPort() + "/test/bug51544.jsp");
-        
+
         // Force a GC to clear out unloaded class (first JSP)
         System.gc();
 
@@ -66,21 +66,21 @@ public class TestDefaultInstanceManager 
 
     private DefaultInstanceManager doClassUnloadingPrep() throws Exception {
         Tomcat tomcat = getTomcatInstance();
-        
+
         // Create the context (don't use addWebapp as we want to modify the
         // JSP Servlet settings).
         File appDir = new File("test/webapp-3.0");
         StandardContext ctxt = (StandardContext) tomcat.addContext(
                 null, "/test", appDir.getAbsolutePath());
-        
+
         // Configure the defaults and then tweak the JSP servlet settings
         // Note: Min value for maxLoadedJsps is 2
         Tomcat.initWebappDefaults(ctxt);
         Wrapper w = (Wrapper) ctxt.findChild("jsp");
         w.addInitParameter("maxLoadedJsps", "2");
-        
+
         tomcat.start();
-        
+
         return (DefaultInstanceManager) ctxt.getInstanceManager();
     }
 }

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java Sun Nov  6 21:06:45 2011
@@ -36,17 +36,17 @@ public class TestNamingContextListener e
     private static final String JNDI_NAME = "TestName";
     private static final String JNDI_VALUE= "Test Value";
 
-    /** 
+    /**
      * Test JNDI is available to ServletContextListeners.
      */
     @Test
     public void testBug49132() throws Exception {
         Tomcat tomcat = getTomcatInstance();
-        
+
         // Must have a real docBase - just use temp
-        org.apache.catalina.Context ctx = 
+        org.apache.catalina.Context ctx =
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-        
+
         // Enable JNDI - it is disabled by default
         tomcat.enableNaming();
 
@@ -55,9 +55,9 @@ public class TestNamingContextListener e
         environment.setName(JNDI_NAME);
         environment.setValue(JNDI_VALUE);
         ctx.getNamingResources().addEnvironment(environment);
-        
+
         ctx.addApplicationListener(Bug49132Listener.class.getName());
-        
+
         tomcat.start();
 
         assertEquals(LifecycleState.STARTED, ctx.getState());

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java Sun Nov  6 21:06:45 2011
@@ -71,17 +71,17 @@ public class TestStandardContext extends
 
     @Test
     public void testBug46243() throws Exception {
-        
+
         // Set up a container
         Tomcat tomcat = getTomcatInstance();
-        
+
         File docBase = new File(tomcat.getHost().getAppBase(), "ROOT");
         if (!docBase.mkdirs() && !docBase.isDirectory()) {
             fail("Unable to create docBase");
         }
-        
+
         Context root = tomcat.addContext("", "ROOT");
-       
+
         // Add test a filter that fails
         FilterDef filterDef = new FilterDef();
         filterDef.setFilterClass(Bug46243Filter.class.getName());
@@ -96,9 +96,9 @@ public class TestStandardContext extends
         // it works (although it shouldn't)
         Tomcat.addServlet(root, "Bug46243", new HelloWorldServlet());
         root.addServletMapping("/", "Bug46243");
-        
+
         tomcat.start();
-        
+
         // Configure the client
         Bug46243Client client = new Bug46243Client();
         client.setPort(getPort());
@@ -108,7 +108,7 @@ public class TestStandardContext extends
         client.processRequest();
         assertTrue(client.isResponse404());
     }
-    
+
     private static final class Bug46243Client extends SimpleHttpClient {
         @Override
         public boolean isResponseBodyOK() {
@@ -116,9 +116,9 @@ public class TestStandardContext extends
             return true;
         }
     }
-    
+
     public static final class Bug46243Filter implements Filter {
-        
+
         @Override
         public void destroy() {
             // NOOP
@@ -135,18 +135,18 @@ public class TestStandardContext extends
         public void init(FilterConfig filterConfig) throws ServletException {
             throw new ServletException("Init fail", new ClassNotFoundException());
         }
-        
+
     }
 
     @Test
     public void testBug49922() throws Exception {
-        
+
         // Set up a container
         Tomcat tomcat = getTomcatInstance();
-        
+
         File root = new File("test/webapp-3.0");
         tomcat.addWebapp("", root.getAbsolutePath());
-        
+
         tomcat.start();
         ByteChunk result;
 
@@ -187,9 +187,9 @@ public class TestStandardContext extends
         assertEquals("IncludeFilterTarget", result.toString());
     }
 
-    
+
     public static final class Bug49922Filter implements Filter {
-        
+
         @Override
         public void destroy() {
             // NOOP
@@ -208,7 +208,7 @@ public class TestStandardContext extends
             // NOOP
         }
     }
-    
+
     public static final class Bug49922ForwardServlet extends HttpServlet {
 
         private static final long serialVersionUID = 1L;
@@ -218,7 +218,7 @@ public class TestStandardContext extends
                 throws ServletException, IOException {
             req.getRequestDispatcher("/bug49922/target").forward(req, resp);
         }
-        
+
     }
 
     public static final class Bug49922IncludeServlet extends HttpServlet {
@@ -232,7 +232,7 @@ public class TestStandardContext extends
             resp.getWriter().print("Include");
             req.getRequestDispatcher("/bug49922/target").include(req, resp);
         }
-        
+
     }
 
     public static final class Bug49922TargetServlet extends HttpServlet {
@@ -245,7 +245,7 @@ public class TestStandardContext extends
             resp.setContentType("text/plain");
             resp.getWriter().print("Target");
         }
-        
+
     }
 
     public static final class Bug49922Servlet extends HttpServlet {
@@ -258,7 +258,7 @@ public class TestStandardContext extends
             resp.setContentType("text/plain");
             resp.getWriter().print("Servlet");
         }
-        
+
     }
 
     @Test
@@ -285,20 +285,20 @@ public class TestStandardContext extends
         // Add ServletContainerInitializer
         ServletContainerInitializer sci = new Bug50015SCI();
         ctx.addServletContainerInitializer(sci, null);
-        
+
         // Start the context
         tomcat.start();
-        
+
         // Request the first servlet
         ByteChunk bc = new ByteChunk();
         int rc = getUrl("http://localhost:" + getPort() + "/bug50015",
                 bc, null);
-        
+
         // Check for a 401
         assertNotSame("OK", bc.toString());
         assertEquals(401, rc);
     }
-    
+
     public static final class Bug50015SCI
             implements ServletContainerInitializer {
 
@@ -309,7 +309,7 @@ public class TestStandardContext extends
             Servlet s = new Bug50015Servlet();
             ServletRegistration.Dynamic sr = ctx.addServlet("bug50015", s);
             sr.addMapping("/bug50015");
-            
+
             // Limit access to users in the Tomcat role
             HttpConstraintElement hce = new HttpConstraintElement(
                     TransportGuarantee.NONE, "tomcat");
@@ -317,7 +317,7 @@ public class TestStandardContext extends
             sr.setServletSecurity(sse);
         }
     }
-    
+
     public static final class Bug50015Servlet extends HttpServlet {
 
         private static final long serialVersionUID = 1L;
@@ -328,7 +328,7 @@ public class TestStandardContext extends
             resp.setContentType("text/plain");
             resp.getWriter().write("OK");
         }
-        
+
     }
 
     @Test
@@ -353,17 +353,17 @@ public class TestStandardContext extends
         // Add ServletContainerInitializer
         Bug51376SCI sci = new Bug51376SCI(loadOnStartUp);
         ctx.addServletContainerInitializer(sci, null);
-        
+
         // Start the context
         tomcat.start();
-        
+
         // Stop the context
         ctx.stop();
-        
+
         // Make sure that init() and destroy() were called correctly
         assertTrue(sci.getServlet().isOk());
     }
-    
+
     public static final class Bug51376SCI
             implements ServletContainerInitializer {
 
@@ -390,14 +390,14 @@ public class TestStandardContext extends
             }
         }
     }
-    
+
     public static final class Bug51376Servlet extends HttpServlet {
 
         private static final long serialVersionUID = 1L;
 
         private Boolean initOk = null;
         private Boolean destoryOk = null;
-        
+
         @Override
         public void init() {
             if (initOk == null && destoryOk == null) {
@@ -422,7 +422,7 @@ public class TestStandardContext extends
             resp.setContentType("text/plain");
             resp.getWriter().write("OK");
         }
-        
+
         protected boolean isOk() {
             if (initOk != null && initOk.booleanValue() && destoryOk != null &&
                     destoryOk.booleanValue()) {
@@ -495,7 +495,7 @@ public class TestStandardContext extends
             resp.setCharacterEncoding("UTF-8");
 
             PrintWriter out = resp.getWriter();
-            
+
             out.println("parts=" + (null == req.getParts()
                                     ? "null"
                                     : Integer.valueOf(req.getParts().size())));
@@ -517,7 +517,7 @@ public class TestStandardContext extends
 
         private synchronized void init() throws Exception {
             if (init) return;
-            
+
             Tomcat tomcat = getTomcatInstance();
             context = tomcat.addContext("", TEMP_DIR);
             Tomcat.addServlet(context, "regular", new Bug49711Servlet());
@@ -530,10 +530,10 @@ public class TestStandardContext extends
             context.addServletMapping("/regular", "regular");
             context.addServletMapping("/multipart", "multipart");
             tomcat.start();
-            
+
             init = true;
         }
-        
+
         private Exception doRequest(String uri,
                                     boolean allowCasualMultipart,
                                     boolean makeMultipartRequest) {
@@ -582,7 +582,7 @@ public class TestStandardContext extends
 
                 setRequest(request);
                 processRequest(); // blocks until response has been read
-                
+
                 // Close the connection
                 disconnect();
             } catch (Exception e) {

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextAliases.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextAliases.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextAliases.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextAliases.java Sun Nov  6 21:06:45 2011
@@ -43,21 +43,21 @@ public class TestStandardContextAliases 
         Tomcat tomcat = getTomcatInstance();
 
         // Must have a real docBase - just use temp
-        StandardContext ctx = (StandardContext) 
+        StandardContext ctx = (StandardContext)
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-        
+
         File lib = new File("webapps/examples/WEB-INF/lib");
         ctx.setAliases("/WEB-INF/lib=" + lib.getCanonicalPath());
-        
+
         Tomcat.addServlet(ctx, "test", new TestServlet());
         ctx.addServletMapping("/", "test");
-        
+
         tomcat.start();
 
         ByteChunk res = getUrl("http://localhost:" + getPort() + "/");
 
         String result = res.toString();
-        
+
         assertTrue(result.indexOf("00-PASS") > -1);
         assertTrue(result.indexOf("01-PASS") > -1);
         assertTrue(result.indexOf("02-PASS") > -1);
@@ -74,28 +74,28 @@ public class TestStandardContextAliases 
         @Override
         protected void doGet(HttpServletRequest req, HttpServletResponse resp)
                 throws ServletException, IOException {
-            
+
             resp.setContentType("text/plain");
-            
+
             ServletContext context = getServletContext();
-            
+
             // Check resources individually
             URL url = context.getResource("/WEB-INF/lib/jstl.jar");
             if (url != null) {
                 resp.getWriter().write("00-PASS\n");
             }
-            
+
             url = context.getResource("/WEB-INF/lib/standard.jar");
             if (url != null) {
                 resp.getWriter().write("01-PASS\n");
             }
-            
+
             // Check a directory listing
             Set<String> libs = context.getResourcePaths("/WEB-INF/lib");
             if (libs == null) {
                 return;
             }
-            
+
             if (!libs.contains("/WEB-INF/lib/jstl.jar")) {
                 return;
             }
@@ -105,6 +105,6 @@ public class TestStandardContextAliases 
 
             resp.getWriter().write("02-PASS\n");
         }
-        
+
     }
 }

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Sun Nov  6 21:06:45 2011
@@ -145,7 +145,7 @@ public class TestStandardContextResource
         "<p>resourceB.jsp in resources.jar</p>");
 
         ctx.stop();
-        
+
         LifecycleListener[] listener1 = ctx.findLifecycleListeners();
         // change ordering and reload
         ContextConfig config1 = new ContextConfig() {
@@ -167,12 +167,12 @@ public class TestStandardContextResource
         ctx.addServletMapping("/getresource", "getresource");
 
         ctx.start();
-        
+
         assertPageContains("/test/getresource?path=/resourceF.jsp",
         "<p>resourceF.jsp in resources2.jar</p>");
         assertPageContains("/test/getresource?path=/resourceB.jsp",
         "<p>resourceB.jsp in resources2.jar</p>");
- 
+
     }
 
     @Test
@@ -183,7 +183,7 @@ public class TestStandardContextResource
         // app dir is relative to server home
         StandardContext ctx = (StandardContext) tomcat.addWebapp(null, "/test",
                 appDir.getAbsolutePath());
-        
+
         Tomcat.addServlet(ctx, "getresource", new GetResourceServlet());
         ctx.addServletMapping("/getresource", "getresource");
 
@@ -252,7 +252,7 @@ public class TestStandardContextResource
         int sc = getUrl("http://localhost:" + getPort() + pageUrl, res, null);
 
         assertEquals(expectedStatus, sc);
-        
+
         if (expectedStatus == 200) {
             String result = res.toString();
             assertTrue(result, result.indexOf(expectedBody) > 0);

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java Sun Nov  6 21:06:45 2011
@@ -49,7 +49,7 @@ public class TestStandardContextValve ex
 
         // Traces order of events across multiple components
         StringBuilder trace = new StringBuilder();
-        
+
         //Add the error page
         Tomcat.addServlet(ctx, "errorPage", new Bug51653ErrorPage(trace));
         ctx.addServletMapping("/error", "errorPage");
@@ -96,7 +96,7 @@ public class TestStandardContextValve ex
 
         // Traces order of events across multiple components
         StringBuilder trace = new StringBuilder();
-        
+
         // Add the page that generates the error
         Tomcat.addServlet(ctx, "test", new Bug51653ErrorTrigger());
         ctx.addServletMapping("/test", "test");
@@ -159,7 +159,7 @@ public class TestStandardContextValve ex
         protected void doGet(HttpServletRequest req, HttpServletResponse resp)
                 throws ServletException, IOException {
             sb.append("Error");
-            
+
             resp.setContentType("text/plain");
             resp.getWriter().write("Error");
         }
@@ -178,7 +178,7 @@ public class TestStandardContextValve ex
         public void requestInitialized(ServletRequestEvent sre) {
             sb.append("Init");
         }
-        
+
         @Override
         public void requestDestroyed(ServletRequestEvent sre) {
             sb.append("Destroy");

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java Sun Nov  6 21:06:45 2011
@@ -101,18 +101,18 @@ public class TestStandardWrapper extends
 
         // Setup Tomcat instance
         Tomcat tomcat = getTomcatInstance();
-        
+
         File appDir = new File("test/webapp-3.0-fragments");
         tomcat.addWebapp(null, "", appDir.getAbsolutePath());
-        
+
         tomcat.start();
-        
+
         ByteChunk bc = new ByteChunk();
         int rc;
         rc = getUrl("http://localhost:" + getPort() +
                 "/testStandardWrapper/securityAnnotationsWebXmlPriority",
                 bc, null, null);
-        
+
         assertNull(bc.toString());
         assertEquals(403, rc);
     }
@@ -122,18 +122,18 @@ public class TestStandardWrapper extends
 
         // Setup Tomcat instance
         Tomcat tomcat = getTomcatInstance();
-        
+
         File appDir = new File("test/webapp-3.0");
         tomcat.addWebapp(null, "", appDir.getAbsolutePath());
-        
+
         tomcat.start();
-        
+
         ByteChunk bc = new ByteChunk();
         int rc;
         rc = getUrl("http://localhost:" + getPort() +
                 "/testStandardWrapper/securityAnnotationsMetaDataPriority",
                 bc, null, null);
-        
+
         assertEquals("OK", bc.toString());
         assertEquals(200, rc);
     }
@@ -152,17 +152,17 @@ public class TestStandardWrapper extends
     public void testSecurityAnnotationsNoWebXmlConstraints() throws Exception {
         // Setup Tomcat instance
         Tomcat tomcat = getTomcatInstance();
-        
+
         File appDir = new File("test/webapp-3.0-servletsecurity");
         tomcat.addWebapp(null, "", appDir.getAbsolutePath());
-        
+
         tomcat.start();
-        
+
         ByteChunk bc = new ByteChunk();
         int rc;
         rc = getUrl("http://localhost:" + getPort() + "/",
                 bc, null, null);
-        
+
         assertNull(bc.toString());
         assertEquals(403, rc);
     }
@@ -171,23 +171,23 @@ public class TestStandardWrapper extends
     public void testSecurityAnnotationsNoWebXmlLoginConfig() throws Exception {
         // Setup Tomcat instance
         Tomcat tomcat = getTomcatInstance();
-        
+
         File appDir = new File("test/webapp-3.0-servletsecurity2");
         tomcat.addWebapp(null, "", appDir.getAbsolutePath());
-        
+
         tomcat.start();
-        
+
         ByteChunk bc = new ByteChunk();
         int rc;
         rc = getUrl("http://localhost:" + getPort() + "/protected.jsp",
                 bc, null, null);
-        
+
         assertNull(bc.toString());
         assertEquals(403, rc);
 
         rc = getUrl("http://localhost:" + getPort() + "/unprotected.jsp",
                 bc, null, null);
-        
+
         assertEquals(200, rc);
         assertTrue(bc.toString().contains("00-OK"));
     }
@@ -197,21 +197,21 @@ public class TestStandardWrapper extends
 
         // Setup Tomcat instance
         Tomcat tomcat = getTomcatInstance();
-        
+
         // Must have a real docBase - just use temp
         Context ctx =
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-        
+
         Servlet s = new DenyAllServlet();
         ServletContainerInitializer sci = new SCI(s, useCreateServlet);
         ctx.addServletContainerInitializer(sci, null);
-        
+
         tomcat.start();
-        
+
         ByteChunk bc = new ByteChunk();
         int rc;
         rc = getUrl("http://localhost:" + getPort() + "/", bc, null, null);
-        
+
         if (useCreateServlet) {
             assertNull(bc.toString());
             assertEquals(403, rc);
@@ -226,27 +226,27 @@ public class TestStandardWrapper extends
 
         // Setup Tomcat instance
         Tomcat tomcat = getTomcatInstance();
-        
+
         // Must have a real docBase - just use temp
         Context ctx =
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-        
+
         Wrapper wrapper = Tomcat.addServlet(ctx, "servlet", servletClassName);
         wrapper.setAsyncSupported(true);
         ctx.addServletMapping("/", "servlet");
-        
+
         if (useRole) {
             MapRealm realm = new MapRealm();
             realm.addUser("testUser", "testPwd");
             realm.addUserRole("testUser", "testRole");
             ctx.setRealm(realm);
-            
+
             ctx.setLoginConfig(new LoginConfig("BASIC", null, null, null));
             ctx.getPipeline().addValve(new BasicAuthenticator());
         }
 
         tomcat.start();
-        
+
         ByteChunk bc = new ByteChunk();
         Map<String,List<String>> reqHeaders = null;
         if (useRole) {
@@ -265,7 +265,7 @@ public class TestStandardWrapper extends
             rc = getUrl("http://localhost:" + getPort() + "/", bc, reqHeaders,
                     null);
         }
-        
+
         if (expect200) {
             assertEquals("OK", bc.toString());
             assertEquals(200, rc);
@@ -281,27 +281,27 @@ public class TestStandardWrapper extends
         @Override
         protected void doGet(HttpServletRequest req, HttpServletResponse resp)
                 throws ServletException, IOException {
-            
+
             resp.setContentType("text/plain");
             resp.getWriter().print("OK");
         }
-        
+
         @Override
         protected void doPost(HttpServletRequest req, HttpServletResponse resp)
                 throws ServletException, IOException {
             doGet(req, resp);
         }
     }
-    
+
     @ServletSecurity(@HttpConstraint(EmptyRoleSemantic.DENY))
     public static class DenyAllServlet extends TestServlet {
         private static final long serialVersionUID = 1L;
     }
-    
+
     public static class SubclassDenyAllServlet extends DenyAllServlet {
         private static final long serialVersionUID = 1L;
     }
-    
+
     @ServletSecurity(@HttpConstraint(EmptyRoleSemantic.PERMIT))
     public static class SubclassAllowAllServlet extends DenyAllServlet {
         private static final long serialVersionUID = 1L;
@@ -316,7 +316,7 @@ public class TestStandardWrapper extends
     public static class MethodConstraintServlet extends TestServlet {
         private static final long serialVersionUID = 1L;
     }
-    
+
     @ServletSecurity(@HttpConstraint(rolesAllowed = "testRole"))
     public static class RoleAllowServlet extends TestServlet {
         private static final long serialVersionUID = 1L;
@@ -331,7 +331,7 @@ public class TestStandardWrapper extends
 
         private Servlet servlet;
         private boolean createServlet;
-        
+
         public SCI(Servlet servlet, boolean createServlet) {
             this.servlet = servlet;
             this.createServlet = createServlet;
@@ -341,7 +341,7 @@ public class TestStandardWrapper extends
         public void onStartup(Set<Class<?>> c, ServletContext ctx)
                 throws ServletException {
             Servlet s;
-            
+
             if (createServlet) {
                 s = ctx.createServlet(servlet.getClass());
             } else {
@@ -354,7 +354,7 @@ public class TestStandardWrapper extends
 
 
     public static final int BUG51445_THREAD_COUNT = 5;
-    
+
     public static CountDownLatch latch = null;
     public static AtomicInteger counter = new AtomicInteger(0);
 
@@ -366,12 +366,12 @@ public class TestStandardWrapper extends
         Tomcat tomcat = getTomcatInstance();
 
         // Must have a real docBase - just use temp
-        StandardContext ctx = (StandardContext) 
+        StandardContext ctx = (StandardContext)
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-        
+
         Tomcat.addServlet(ctx, "Bug51445", new Bug51445Servlet());
         ctx.addServletMapping("/", "Bug51445");
-        
+
         tomcat.start();
 
         // Start the threads
@@ -391,7 +391,7 @@ public class TestStandardWrapper extends
         for (int i = 0; i < BUG51445_THREAD_COUNT; i ++) {
             System.out.println(threads[i].getResult());
         }
-        
+
         // Check the result
         for (int i = 0; i < BUG51445_THREAD_COUNT; i ++) {
             String[] results = threads[i].getResult().split(",");
@@ -404,21 +404,21 @@ public class TestStandardWrapper extends
 
     @Test
     public void testBug51445AddChild() throws Exception {
-        
+
         latch = new CountDownLatch(BUG51445_THREAD_COUNT);
 
         Tomcat tomcat = getTomcatInstance();
 
         // Must have a real docBase - just use temp
-        StandardContext ctx = (StandardContext) 
+        StandardContext ctx = (StandardContext)
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-        
+
         StandardWrapper wrapper = new StandardWrapper();
         wrapper.setServletName("Bug51445");
         wrapper.setServletClass(Bug51445Servlet.class.getName());
         ctx.addChild(wrapper);
         ctx.addServletMapping("/", "Bug51445");
-        
+
         tomcat.start();
 
         // Start the threads
@@ -484,7 +484,7 @@ public class TestStandardWrapper extends
 
         private int data = 0;
         private int counter;
-        
+
         public Bug51445Servlet() {
             // Use this rather than hashCode since in some environments,
             // multiple instances of this object were created with the same
@@ -497,7 +497,7 @@ public class TestStandardWrapper extends
                 throws ServletException, IOException {
 
             boolean latchAwaitResult = false;
-            
+
             // Ensure all threads have their own instance of the servlet
             latch.countDown();
             try {

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java Sun Nov  6 21:06:45 2011
@@ -291,12 +291,12 @@ public class TestSwallowAbortedUploads e
                 String content = new String(sb.toString().getBytes("UTF-8"),
                         "ASCII");
 
-                request = new String[] { "POST http://localhost:" + getPort() + URI + " HTTP/1.1" + CRLF 
+                request = new String[] { "POST http://localhost:" + getPort() + URI + " HTTP/1.1" + CRLF
                         + "Host: localhost" + CRLF
                         + "Connection: close" + CRLF
-                        + "Content-Type: multipart/form-data; boundary=" + boundary + CRLF 
-                        + "Content-Length: " + content.length() + CRLF 
-                        + CRLF 
+                        + "Content-Type: multipart/form-data; boundary=" + boundary + CRLF
+                        + "Content-Length: " + content.length() + CRLF
+                        + CRLF
                         + content + CRLF };
 
                 setRequest(request);
@@ -321,11 +321,11 @@ public class TestSwallowAbortedUploads e
         private static final long serialVersionUID = 1L;
 
         private int status = 200;
-        
+
         public void setStatus(int status) {
             this.status = status;
         }
-        
+
         @Override
         protected void doPost(HttpServletRequest req, HttpServletResponse resp)
                 throws ServletException, IOException {

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestSecurityConstraint.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestSecurityConstraint.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestSecurityConstraint.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestSecurityConstraint.java Sun Nov  6 21:06:45 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,14 +42,14 @@ public class TestSecurityConstraint {
      */
     @Test
     public void testCreateConstraints() {
-        
+
         ServletSecurityElement element;
         SecurityConstraint[] result;
         Set<HttpMethodConstraintElement> hmces =
             new HashSet<HttpMethodConstraintElement>();
-        
+
         // Example 13-1
-        // @ServletSecurity 
+        // @ServletSecurity
         element = new ServletSecurityElement();
         result = SecurityConstraint.createConstraints(element, URL_PATTERN);
 
@@ -70,9 +70,9 @@ public class TestSecurityConstraint {
         assertEquals(0, result[0].findCollections()[0].findMethods().length);
         assertEquals(ServletSecurity.TransportGuarantee.CONFIDENTIAL.name(),
                 result[0].getUserConstraint());
-        
+
         // Example 13-3
-        // @ServletSecurity(@HttpConstraint(EmptyRoleSemantic.DENY)) 
+        // @ServletSecurity(@HttpConstraint(EmptyRoleSemantic.DENY))
         element = new ServletSecurityElement(
                 new HttpConstraintElement(EmptyRoleSemantic.DENY));
         result = SecurityConstraint.createConstraints(element, URL_PATTERN);
@@ -83,9 +83,9 @@ public class TestSecurityConstraint {
         assertEquals(0, result[0].findCollections()[0].findMethods().length);
         assertEquals(ServletSecurity.TransportGuarantee.NONE.name(),
                 result[0].getUserConstraint());
-        
+
         // Example 13-4
-        // @ServletSecurity(@HttpConstraint(rolesAllowed = "R1")) 
+        // @ServletSecurity(@HttpConstraint(rolesAllowed = "R1"))
         element = new ServletSecurityElement(new HttpConstraintElement(
                 ServletSecurity.TransportGuarantee.NONE, ROLE1));
         result = SecurityConstraint.createConstraints(element, URL_PATTERN);
@@ -100,10 +100,10 @@ public class TestSecurityConstraint {
                 result[0].getUserConstraint());
 
         // Example 13-5
-        // @ServletSecurity((httpMethodConstraints = { 
-        //     @HttpMethodConstraint(value = "GET", rolesAllowed = "R1"), 
-        //     @HttpMethodConstraint(value = "POST", rolesAllowed = "R1", 
-        //     transportGuarantee = TransportGuarantee.CONFIDENTIAL) 
+        // @ServletSecurity((httpMethodConstraints = {
+        //     @HttpMethodConstraint(value = "GET", rolesAllowed = "R1"),
+        //     @HttpMethodConstraint(value = "POST", rolesAllowed = "R1",
+        //     transportGuarantee = TransportGuarantee.CONFIDENTIAL)
         // })
         hmces.clear();
         hmces.add(new HttpMethodConstraintElement("GET",
@@ -115,7 +115,7 @@ public class TestSecurityConstraint {
                         ROLE1)));
         element = new ServletSecurityElement(hmces);
         result = SecurityConstraint.createConstraints(element, URL_PATTERN);
-        
+
         assertEquals(2, result.length);
         for (int i = 0; i < 2; i++) {
             assertTrue(result[i].getAuthConstraint());
@@ -134,9 +134,9 @@ public class TestSecurityConstraint {
                 fail("Unexpected method :[" + method + "]");
             }
         }
-        
+
         // Example 13-6
-        // @ServletSecurity(value = @HttpConstraint(rolesAllowed = "R1"), 
+        // @ServletSecurity(value = @HttpConstraint(rolesAllowed = "R1"),
         //     httpMethodConstraints = @HttpMethodConstraint("GET"))
         hmces.clear();
         hmces.add(new HttpMethodConstraintElement("GET"));
@@ -146,7 +146,7 @@ public class TestSecurityConstraint {
                         ROLE1),
                 hmces);
         result = SecurityConstraint.createConstraints(element, URL_PATTERN);
-        
+
         assertEquals(2, result.length);
         for (int i = 0; i < 2; i++) {
             assertTrue(result[i].findCollections()[0].findPattern(URL_PATTERN));
@@ -166,10 +166,10 @@ public class TestSecurityConstraint {
             assertEquals(ServletSecurity.TransportGuarantee.NONE.name(),
                     result[i].getUserConstraint());
         }
-        
+
         // Example 13-7
-        // @ServletSecurity(value = @HttpConstraint(rolesAllowed = "R1"), 
-        //     httpMethodConstraints = @HttpMethodConstraint(value="TRACE", 
+        // @ServletSecurity(value = @HttpConstraint(rolesAllowed = "R1"),
+        //     httpMethodConstraints = @HttpMethodConstraint(value="TRACE",
         //         emptyRoleSemantic = EmptyRoleSemantic.DENY))
         hmces.clear();
         hmces.add(new HttpMethodConstraintElement("TRACE",
@@ -180,7 +180,7 @@ public class TestSecurityConstraint {
                         ROLE1),
                 hmces);
         result = SecurityConstraint.createConstraints(element, URL_PATTERN);
-        
+
         assertEquals(2, result.length);
         for (int i = 0; i < 2; i++) {
             assertTrue(result[i].findCollections()[0].findPattern(URL_PATTERN));
@@ -201,7 +201,7 @@ public class TestSecurityConstraint {
             assertEquals(ServletSecurity.TransportGuarantee.NONE.name(),
                     result[i].getUserConstraint());
         }
-        
+
         // Example 13-8 is the same as 13-4
         // Example 13-9 is the same as 13-7
     }

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXml.java Sun Nov  6 21:06:45 2011
@@ -28,45 +28,45 @@ public class TestWebXml {
 
     @Test
     public void testParseVersion() {
-        
+
         WebXml webxml = new WebXml();
-        
+
         // Defaults
         assertEquals(3, webxml.getMajorVersion());
         assertEquals(0, webxml.getMinorVersion());
-        
+
         // Both get changed
         webxml.setVersion("2.5");
         assertEquals(2, webxml.getMajorVersion());
         assertEquals(5, webxml.getMinorVersion());
-        
+
         // Reset
         webxml.setVersion("0.0");
         assertEquals(0, webxml.getMajorVersion());
         assertEquals(0, webxml.getMinorVersion());
-        
+
         // null input should be ignored
         webxml.setVersion(null);
         assertEquals(0, webxml.getMajorVersion());
         assertEquals(0, webxml.getMinorVersion());
-        
+
         // major only
         webxml.setVersion("3");
         assertEquals(3, webxml.getMajorVersion());
         assertEquals(0, webxml.getMinorVersion());
-        
+
         // no minor digit
         webxml.setVersion("0.0");   // reset
         webxml.setVersion("3.");
         assertEquals(3, webxml.getMajorVersion());
         assertEquals(0, webxml.getMinorVersion());
-        
+
         // minor only
         webxml.setVersion("0.0");   // reset
         webxml.setVersion(".5");
         assertEquals(0, webxml.getMajorVersion());
         assertEquals(5, webxml.getMinorVersion());
-        
+
         // leading & training zeros
         webxml.setVersion("0.0");   // reset
         webxml.setVersion("002.500");
@@ -76,9 +76,9 @@ public class TestWebXml {
 
     @Test
     public void testParsePublicIdVersion22() {
-        
+
         WebXml webxml = new WebXml();
-        
+
         webxml.setPublicId(
                 org.apache.catalina.startup.Constants.WebDtdPublicId_22);
         assertEquals(2, webxml.getMajorVersion());
@@ -88,9 +88,9 @@ public class TestWebXml {
 
     @Test
     public void testParsePublicIdVersion23() {
-        
+
         WebXml webxml = new WebXml();
-        
+
         webxml.setPublicId(
                 org.apache.catalina.startup.Constants.WebDtdPublicId_23);
         assertEquals(2, webxml.getMajorVersion());
@@ -100,9 +100,9 @@ public class TestWebXml {
 
     @Test
     public void testParsePublicIdVersion24() {
-        
+
         WebXml webxml = new WebXml();
-        
+
         webxml.setPublicId(
                 org.apache.catalina.startup.Constants.WebSchemaPublicId_24);
         assertEquals(2, webxml.getMajorVersion());
@@ -112,9 +112,9 @@ public class TestWebXml {
 
     @Test
     public void testParsePublicIdVersion25() {
-        
+
         WebXml webxml = new WebXml();
-        
+
         webxml.setPublicId(
                 org.apache.catalina.startup.Constants.WebSchemaPublicId_25);
         assertEquals(2, webxml.getMajorVersion());
@@ -124,9 +124,9 @@ public class TestWebXml {
 
     @Test
     public void testParsePublicIdVersion30() {
-        
+
         WebXml webxml = new WebXml();
-        
+
         webxml.setPublicId(
                 org.apache.catalina.startup.Constants.WebSchemaPublicId_30);
         assertEquals(3, webxml.getMajorVersion());

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/deploy/TestWebXmlOrdering.java Sun Nov  6 21:06:45 2011
@@ -74,9 +74,9 @@ public class TestWebXmlOrdering {
         app.addAbsoluteOrdering("b");
         app.addAbsoluteOrdering("e");
         app.addAbsoluteOrdering("d");
-        
+
         Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
-        
+
         Iterator<WebXml> iter = ordered.iterator();
         assertEquals(c,iter.next());
         assertEquals(a,iter.next());
@@ -90,9 +90,9 @@ public class TestWebXmlOrdering {
     public void testOrderWebFragmentsAbsolutePartial() {
         app.addAbsoluteOrdering("c");
         app.addAbsoluteOrdering("a");
-        
+
         Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
-        
+
         Iterator<WebXml> iter = ordered.iterator();
         assertEquals(c,iter.next());
         assertEquals(a,iter.next());
@@ -104,15 +104,15 @@ public class TestWebXmlOrdering {
         app.addAbsoluteOrdering(WebXml.ORDER_OTHERS);
         app.addAbsoluteOrdering("b");
         app.addAbsoluteOrdering("d");
-        
+
         Set<WebXml> others = new HashSet<WebXml>();
         others.add(a);
         others.add(c);
         others.add(e);
         others.add(f);
-        
+
         Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
-        
+
         Iterator<WebXml> iter = ordered.iterator();
         while (others.size() > 0) {
             WebXml o = iter.next();
@@ -129,13 +129,13 @@ public class TestWebXmlOrdering {
         app.addAbsoluteOrdering("b");
         app.addAbsoluteOrdering(WebXml.ORDER_OTHERS);
         app.addAbsoluteOrdering("d");
-        
+
         Set<WebXml> others = new HashSet<WebXml>();
         others.add(a);
         others.add(c);
         others.add(e);
         others.add(f);
-        
+
         Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
 
         Iterator<WebXml> iter = ordered.iterator();
@@ -164,13 +164,13 @@ public class TestWebXmlOrdering {
         app.addAbsoluteOrdering("b");
         app.addAbsoluteOrdering("d");
         app.addAbsoluteOrdering(WebXml.ORDER_OTHERS);
-        
+
         Set<WebXml> others = new HashSet<WebXml>();
         others.add(a);
         others.add(c);
         others.add(e);
         others.add(f);
-        
+
         Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
 
         Iterator<WebXml> iter = ordered.iterator();
@@ -194,9 +194,9 @@ public class TestWebXmlOrdering {
         c.addAfterOrderingOthers();
         f.addBeforeOrderingOthers();
         f.addBeforeOrdering("b");
-        
+
         Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
-        
+
         Iterator<WebXml> iter = ordered.iterator();
         assertEquals(f,iter.next());
         assertEquals(b,iter.next());
@@ -214,9 +214,9 @@ public class TestWebXmlOrdering {
         b.addBeforeOrderingOthers();
         d.addAfterOrderingOthers();
         e.addBeforeOrderingOthers();
-        
+
         Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
-        
+
         Iterator<WebXml> iter = ordered.iterator();
         // A number of orders are possible but the algorithm is deterministic
         // and this order is valid. If this fails after a change to the
@@ -238,7 +238,7 @@ public class TestWebXmlOrdering {
         fragments.remove("f");
 
         Set<WebXml> ordered = WebXml.orderWebFragments(app, fragments);
-        
+
         Iterator<WebXml> iter = ordered.iterator();
         // A number of orders are possible but the algorithm is deterministic
         // and this order is valid. If this fails after a change to the
@@ -253,15 +253,15 @@ public class TestWebXmlOrdering {
     public void testOrderWebFragmentsrelativeCircular() {
         a.addBeforeOrdering("b");
         b.addBeforeOrdering("a");
-        
+
         Exception exception = null;
-        
+
         try {
             WebXml.orderWebFragments(app, fragments);
         } catch (Exception e1) {
             exception = e1;
         }
-        
+
         assertTrue(exception instanceof IllegalArgumentException);
     }
 }

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java Sun Nov  6 21:06:45 2011
@@ -85,21 +85,21 @@ public class TestAddCharSetFilter extend
     private void doTest(String encoding, String expected) throws Exception {
         doTest(encoding, expected, 1);
     }
-    
+
     private void doTest(String encoding, String expected, int mode)
             throws Exception {
         // Setup Tomcat instance
         Tomcat tomcat = getTomcatInstance();
-        
+
         // Must have a real docBase - just use temp
-        Context ctx = 
+        Context ctx =
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));
 
         // Add the Servlet
         CharsetServlet servlet = new CharsetServlet(mode);
         Tomcat.addServlet(ctx, "servlet", servlet);
         ctx.addServletMapping("/", "servlet");
-        
+
         // Add the Filter
         FilterDef filterDef = new FilterDef();
         filterDef.setFilterClass(AddDefaultCharsetFilter.class.getName());
@@ -112,12 +112,12 @@ public class TestAddCharSetFilter extend
         filterMap.setFilterName("filter");
         filterMap.addServletName("servlet");
         ctx.addFilterMap(filterMap);
-        
+
         tomcat.start();
 
         Map<String, List<String>> headers = new HashMap<String, List<String>>();
         getUrl("http://localhost:" + getPort() + "/", new ByteChunk(), headers);
-        
+
         List<String> ctHeaders = headers.get("Content-Type");
         assertEquals(1, ctHeaders.size());
         String ct = ctHeaders.get(0);
@@ -127,9 +127,9 @@ public class TestAddCharSetFilter extend
     private static class CharsetServlet extends HttpServlet {
         private static final long serialVersionUID = 1L;
         private static final String OUTPUT = "OK";
-        
+
         private final int mode;
-        
+
         public CharsetServlet(int mode) {
             this.mode = mode;
         }
@@ -137,13 +137,13 @@ public class TestAddCharSetFilter extend
         @Override
         protected void doGet(HttpServletRequest req, HttpServletResponse resp)
                 throws ServletException, IOException {
-            
+
             switch (mode) {
                 case 1:
                     resp.setContentType("text/plain");
                     break;
                 case 2:
-                    resp.setContentType("text/plain;charset=ISO-8859-2"); 
+                    resp.setContentType("text/plain;charset=ISO-8859-2");
                     break;
                 case 3:
                     resp.setContentType("text/plain");

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter.java Sun Nov  6 21:06:45 2011
@@ -75,17 +75,17 @@ public class TestCsrfPreventionFilter ex
         cache.add("key4");
         cache.add("key5");
         cache.add("key6");
-        
+
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream oos = new ObjectOutputStream(baos);
         oos.writeObject(cache);
-        
+
         ByteArrayInputStream bais =
             new ByteArrayInputStream(baos.toByteArray());
         ObjectInputStream ois = new ObjectInputStream(bais);
         @SuppressWarnings("unchecked")
         LruCache<String> cache2 = (LruCache<String>) ois.readObject();
-        
+
         cache2.add("key7");
         assertFalse(cache2.contains("key1"));
         assertFalse(cache2.contains("key2"));

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java Sun Nov  6 21:06:45 2011
@@ -33,16 +33,16 @@ public class TestCsrfPreventionFilter2 {
     public void testLruCacheConcurrency() throws Exception {
         int threadCount = 2;
         long iterationCount = 100000L;
-        
+
         assertTrue(threadCount > 1);
 
         LruCache<String> cache = new LruCache<String>(threadCount - 1);
-        
+
         LruTestThread[] threads = new LruTestThread[threadCount];
         for (int i = 0; i < threadCount; i++) {
             threads[i] = new LruTestThread(cache, iterationCount);
         }
-        
+
         for (int i = 0; i < threadCount; i++) {
             threads[i].start();
         }

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterResponse.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterResponse.java?rev=1198555&r1=1198554&r2=1198555&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterResponse.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TesterResponse.java Sun Nov  6 21:06:45 2011
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -83,7 +83,7 @@ public class TesterResponse
     public void setError() {/* NOOP */}
     public boolean isError() { return false; }
     /**
-     * 
+     *
      * @return
      * @throws IOException
      */
@@ -91,7 +91,7 @@ public class TesterResponse
         return null;
     }
     /**
-     * 
+     *
      * @throws IOException
      */
     public void finishResponse() throws IOException {/* NOOP */}
@@ -101,7 +101,7 @@ public class TesterResponse
     public PrintWriter getReporter() { return null; }
     public void recycle() {/* NOOP */}
     /**
-     * 
+     *
      * @param b
      * @throws IOException
      */
@@ -109,7 +109,7 @@ public class TesterResponse
         // NOOP
     }
     /**
-     * 
+     *
      * @param b
      * @throws IOException
      */
@@ -117,7 +117,7 @@ public class TesterResponse
         // NOOP
     }
     /**
-     * 
+     *
      * @param b
      * @param off
      * @param len
@@ -190,7 +190,7 @@ public class TesterResponse
     @Deprecated
     public String encodeUrl(String url) { return null; }
     /**
-     * 
+     *
      * @throws IOException
      */
     public void sendAcknowledgement() throws IOException {/* NOOP */}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message