Skip to content

Commit

Permalink
Code cleanups.
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Aug 6, 2020
1 parent 4f57810 commit 1f14dfa
Showing 1 changed file with 22 additions and 22 deletions.
Expand Up @@ -189,7 +189,7 @@ public void testGETResponseWithContent(Scenario scenario) throws Exception
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
response.getOutputStream().write(data);
baseRequest.setHandled(true);
Expand All @@ -214,7 +214,7 @@ public void testGETWithParametersResponseWithContent(Scenario scenario) throws E
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
response.setCharacterEncoding("UTF-8");
ServletOutputStream output = response.getOutputStream();
Expand Down Expand Up @@ -247,7 +247,7 @@ public void testGETWithParametersMultiValuedResponseWithContent(Scenario scenari
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
response.setCharacterEncoding("UTF-8");
ServletOutputStream output = response.getOutputStream();
Expand Down Expand Up @@ -286,7 +286,7 @@ public void testPOSTWithParameters(Scenario scenario) throws Exception
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
baseRequest.setHandled(true);
String value = request.getParameter(paramName);
Expand Down Expand Up @@ -319,7 +319,7 @@ public void testPUTWithParameters(Scenario scenario) throws Exception
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
baseRequest.setHandled(true);
String value = request.getParameter(paramName);
Expand Down Expand Up @@ -353,7 +353,7 @@ public void testPOSTWithParametersWithContent(Scenario scenario) throws Exceptio
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
baseRequest.setHandled(true);
consume(request.getInputStream(), true);
Expand Down Expand Up @@ -385,7 +385,7 @@ public void testPOSTWithContentNotifiesRequestContentListener(Scenario scenario)
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
baseRequest.setHandled(true);
consume(request.getInputStream(), true);
Expand Down Expand Up @@ -416,7 +416,7 @@ public void testPOSTWithContentTracksProgress(Scenario scenario) throws Exceptio
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
baseRequest.setHandled(true);
consume(request.getInputStream(), true);
Expand Down Expand Up @@ -499,7 +499,7 @@ public void testQueuedRequestIsSentWhenPreviousRequestClosedConnection(Scenario
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response)
{
if (target.endsWith("/one"))
baseRequest.getHttpChannel().getEndPoint().close();
Expand Down Expand Up @@ -619,7 +619,7 @@ public void testExchangeIsCompleteWhenRequestFailsMidwayWithResponse(Scenario sc
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
// Echo back
IO.copy(request.getInputStream(), response.getOutputStream());
Expand Down Expand Up @@ -713,7 +713,7 @@ public void testRequestIdleTimeout(Scenario scenario) throws Exception
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws ServletException
{
try
{
Expand Down Expand Up @@ -772,7 +772,7 @@ public void testHeaderProcessing(Scenario scenario) throws Exception
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response)
{
baseRequest.setHandled(true);
response.setHeader(headerName, "X");
Expand Down Expand Up @@ -830,7 +830,7 @@ public void testHEADWithResponseContentLength(Scenario scenario) throws Exceptio
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
baseRequest.setHandled(true);
response.getOutputStream().write(new byte[length]);
Expand Down Expand Up @@ -935,7 +935,7 @@ public void testCustomUserAgent(Scenario scenario) throws Exception
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response)
{
baseRequest.setHandled(true);
ArrayList<String> userAgents = Collections.list(request.getHeaders("User-Agent"));
Expand Down Expand Up @@ -969,7 +969,7 @@ public void testUserAgentCanBeRemoved(Scenario scenario) throws Exception
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response)
{
baseRequest.setHandled(true);
ArrayList<String> userAgents = Collections.list(request.getHeaders("User-Agent"));
Expand Down Expand Up @@ -1178,7 +1178,7 @@ public void setOnCompleteCallbackWithBlockingSend(Scenario scenario) throws Exce
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
baseRequest.setHandled(true);
response.getOutputStream().write(content);
Expand Down Expand Up @@ -1220,7 +1220,7 @@ public void testCustomHostHeader(Scenario scenario) throws Exception
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response)
{
baseRequest.setHandled(true);
assertEquals(host, request.getServerName());
Expand All @@ -1242,10 +1242,10 @@ public void testHTTP10WithKeepAliveAndContentLength(Scenario scenario) throws Ex
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
// Send the headers at this point, then write the content
byte[] content = "TEST".getBytes("UTF-8");
byte[] content = "TEST".getBytes(StandardCharsets.UTF_8);
response.setContentLength(content.length);
response.flushBuffer();
response.getOutputStream().write(content);
Expand All @@ -1270,7 +1270,7 @@ public void testHTTP10WithKeepAliveAndNoContentLength(Scenario scenario) throws
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
// Send the headers at this point, then write the content
response.flushBuffer();
Expand Down Expand Up @@ -1328,7 +1328,7 @@ public void testLongPollIsAbortedWhenClientIsStopped(Scenario scenario) throws E
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response)
{
baseRequest.setHandled(true);
request.startAsync();
Expand Down Expand Up @@ -1794,7 +1794,7 @@ public void testContentListenerAsCompleteListener(Scenario scenario) throws Exce
start(scenario, new AbstractHandler()
{
@Override
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
public void handle(String target, org.eclipse.jetty.server.Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException
{
baseRequest.setHandled(true);
ServletOutputStream output = response.getOutputStream();
Expand Down

0 comments on commit 1f14dfa

Please sign in to comment.