Merge branch '5.3.x'

# Conflicts:
#	spring-context/src/test/java/org/springframework/context/annotation/Gh29105Tests.java
This commit is contained in:
Sam Brannen
2022-11-08 12:27:40 +01:00
5 changed files with 15 additions and 17 deletions

View File

@@ -492,8 +492,9 @@ public final class ContentDisposition {
* @see <a href="https://tools.ietf.org/html/rfc5987">RFC 5987</a>
*/
private static String decodeFilename(String filename, Charset charset) {
Assert.notNull(filename, "'input' String should not be null");
Assert.notNull(charset, "'charset' should not be null");
Assert.notNull(filename, "'filename' must not be null");
Assert.notNull(charset, "'charset' must not be null");
byte[] value = filename.getBytes(charset);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int index = 0;

View File

@@ -64,12 +64,12 @@ class UndertowServerHttpResponse extends AbstractListenerServerHttpResponse impl
HttpServerExchange exchange, DataBufferFactory bufferFactory, UndertowServerHttpRequest request) {
super(bufferFactory, createHeaders(exchange));
Assert.notNull(exchange, "HttpServerExchange must not be null");
this.exchange = exchange;
this.request = request;
}
private static HttpHeaders createHeaders(HttpServerExchange exchange) {
Assert.notNull(exchange, "HttpServerExchange must not be null");
UndertowHeadersAdapter headersMap = new UndertowHeadersAdapter(exchange.getResponseHeaders());
return new HttpHeaders(headersMap);
}