Introduce Checkstyle rule for separator symbol location

This commit is contained in:
Sam Brannen
2025-03-19 15:35:35 +01:00
parent 18c3b637e4
commit 208d52d852
97 changed files with 378 additions and 403 deletions

View File

@@ -88,8 +88,8 @@ class ErrorHandlerIntegrationTests extends AbstractHttpHandlerIntegrationTests {
// but an application can apply CompactPathRule via RewriteHandler:
// https://www.eclipse.org/jetty/documentation/jetty-11/programming_guide.php
HttpStatus expectedStatus = (httpServer instanceof JettyHttpServer || httpServer instanceof JettyCoreHttpServer
? HttpStatus.BAD_REQUEST : HttpStatus.OK);
HttpStatus expectedStatus = (httpServer instanceof JettyHttpServer || httpServer instanceof JettyCoreHttpServer ?
HttpStatus.BAD_REQUEST : HttpStatus.OK);
assertThat(response.getStatusCode()).isEqualTo(expectedStatus);
}

View File

@@ -55,8 +55,8 @@ class ZeroCopyIntegrationTests extends AbstractHttpHandlerIntegrationTests {
@ParameterizedHttpServerTest
void zeroCopy(HttpServer httpServer) throws Exception {
assumeTrue(httpServer instanceof ReactorHttpServer || httpServer instanceof UndertowHttpServer
|| httpServer instanceof JettyCoreHttpServer, "Zero-copy does not support Servlet");
assumeTrue(httpServer instanceof ReactorHttpServer || httpServer instanceof UndertowHttpServer ||
httpServer instanceof JettyCoreHttpServer, "Zero-copy does not support Servlet");
startServer(httpServer);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -258,23 +258,25 @@ class RequestLoggingFilterTests {
filter.doFilter(request, response, filterChain);
assertThat(filter.beforeRequestMessage)
.isEqualTo("Before request ["
+ "POST /hotels?booking=42"
+ ", client=4.2.2.2"
+ ", session=42"
+ ", user=Arthur"
+ ", headers=[Content-Type:\"application/json;charset=ISO-8859-1\", Content-Length:\"22\"]"
+ "]");
.isEqualTo("""
Before request [\
POST /hotels?booking=42, \
client=4.2.2.2, \
session=42, \
user=Arthur, \
headers=[Content-Type:"application/json;charset=ISO-8859-1", Content-Length:"22"]\
]""");
assertThat(filter.afterRequestMessage)
.isEqualTo("After request ["
+ "POST /hotels?booking=42"
+ ", client=4.2.2.2"
+ ", session=42"
+ ", user=Arthur"
+ ", headers=[Content-Type:\"application/json;charset=ISO-8859-1\", Content-Length:\"22\"]"
+ ", payload={\"msg\": \"Hello World\"}"
+ "]");
.isEqualTo("""
After request [\
POST /hotels?booking=42, \
client=4.2.2.2, \
session=42, \
user=Arthur, \
headers=[Content-Type:"application/json;charset=ISO-8859-1", Content-Length:"22"], \
payload={"msg": "Hello World"}\
]""");
}
private void applyFilter() throws Exception {