From 67dad9fd222764247051a03c27df937810016f45 Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 10 Jan 2011 07:43:34 +0000 Subject: [PATCH] Configure Checkstyle to allow limited static imports and revert most of r1056947 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1057100 13f79535-47bb-0310-9956-ffa450edef68 --- res/checkstyle/checkstyle.xml | 5 +++- .../catalina/servlets/TestDefaultServlet.java | 28 +++++++++++----------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/res/checkstyle/checkstyle.xml b/res/checkstyle/checkstyle.xml index 024bf91e6..5204bc7eb 100644 --- a/res/checkstyle/checkstyle.xml +++ b/res/checkstyle/checkstyle.xml @@ -37,7 +37,10 @@ - + + + diff --git a/test/org/apache/catalina/servlets/TestDefaultServlet.java b/test/org/apache/catalina/servlets/TestDefaultServlet.java index d161c0d13..cf01d5dc5 100644 --- a/test/org/apache/catalina/servlets/TestDefaultServlet.java +++ b/test/org/apache/catalina/servlets/TestDefaultServlet.java @@ -30,6 +30,8 @@ import java.util.TimeZone; import javax.servlet.http.HttpServletResponse; +import static org.apache.catalina.startup.SimpleHttpClient.CRLF; + import org.apache.catalina.startup.SimpleHttpClient; import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; @@ -186,8 +188,8 @@ public class TestDefaultServlet extends TomcatBaseTest { client.setPort(getPort()); client.reset(); - client.setRequest(new String[] { "GET /MyApp/missing HTTP/1.0" + - SimpleHttpClient.CRLF + SimpleHttpClient.CRLF }); + client.setRequest(new String[] { + "GET /MyApp/missing HTTP/1.0" +CRLF + CRLF }); client.connect(); client.processRequest(); assertTrue(client.isResponse404()); @@ -203,11 +205,10 @@ public class TestDefaultServlet extends TomcatBaseTest { // client.reset(); client.setRequest(new String[] { - "GET /MyApp/missing HTTP/1.1" + SimpleHttpClient.CRLF + - "Host: localhost" + SimpleHttpClient.CRLF + - "Connection: close" + SimpleHttpClient.CRLF + - "If-Modified-Since: " + tomorrow + SimpleHttpClient.CRLF + - SimpleHttpClient.CRLF }); + "GET /MyApp/missing HTTP/1.1" + CRLF + + "Host: localhost" + CRLF + + "Connection: close" + CRLF + + "If-Modified-Since: " + tomorrow + CRLF + CRLF }); client.connect(); client.processRequest(); assertTrue(client.isResponse404()); @@ -217,11 +218,10 @@ public class TestDefaultServlet extends TomcatBaseTest { // client.reset(); client.setRequest(new String[] { - "GET /MyApp/missing HTTP/1.1" + SimpleHttpClient.CRLF + - "Host: localhost" + SimpleHttpClient.CRLF + - "Connection: close" + SimpleHttpClient.CRLF + - "Range: bytes=0-100" + SimpleHttpClient.CRLF + - SimpleHttpClient.CRLF }); + "GET /MyApp/missing HTTP/1.1" + CRLF + + "Host: localhost" + CRLF + + "Connection: close" + CRLF + + "Range: bytes=0-100" + CRLF + CRLF }); client.connect(); client.processRequest(); assertTrue(client.isResponse404()); @@ -261,8 +261,8 @@ public class TestDefaultServlet extends TomcatBaseTest { client.setPort(getPort()); client.reset(); - client.setRequest(new String[] { "GET /MyApp/missing HTTP/1.0" + - SimpleHttpClient.CRLF + SimpleHttpClient.CRLF }); + client.setRequest(new String[] { + "GET /MyApp/missing HTTP/1.0" + CRLF + CRLF }); client.connect(); client.processRequest(); assertTrue(client.isResponse404()); -- 2.11.0