Browse Source

Merge branch '6.2.x'

# Conflicts:
#	framework-platform/framework-platform.gradle
pull/34571/head
Juergen Hoeller 9 months ago
parent
commit
15b251dcd6
  1. 2
      buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java
  2. 42
      framework-platform/framework-platform.gradle
  3. 3
      spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreHttpHandlerAdapter.java
  4. 3
      spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreServerHttpRequest.java
  5. 23
      spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreServerHttpResponse.java

2
buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java

@ -50,7 +50,7 @@ public class CheckstyleConventions {
project.getPlugins().apply(CheckstylePlugin.class); project.getPlugins().apply(CheckstylePlugin.class);
project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g")); project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g"));
CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class); CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class);
checkstyle.setToolVersion("10.21.2"); checkstyle.setToolVersion("10.21.4");
checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle")); checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle"));
String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion(); String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion();
DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies(); DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies();

42
framework-platform/framework-platform.gradle

@ -7,12 +7,12 @@ javaPlatform {
} }
dependencies { dependencies {
api(platform("com.fasterxml.jackson:jackson-bom:2.18.2")) api(platform("com.fasterxml.jackson:jackson-bom:2.18.3"))
api(platform("io.micrometer:micrometer-bom:1.14.4")) api(platform("io.micrometer:micrometer-bom:1.14.4"))
api(platform("io.netty:netty-bom:4.1.118.Final")) api(platform("io.netty:netty-bom:4.1.119.Final"))
api(platform("io.projectreactor:reactor-bom:2024.0.3")) api(platform("io.projectreactor:reactor-bom:2024.0.3"))
api(platform("io.rsocket:rsocket-bom:1.1.5")) api(platform("io.rsocket:rsocket-bom:1.1.5"))
api(platform("org.apache.groovy:groovy-bom:4.0.24")) api(platform("org.apache.groovy:groovy-bom:4.0.26"))
api(platform("org.apache.logging.log4j:log4j-bom:3.0.0-beta3")) api(platform("org.apache.logging.log4j:log4j-bom:3.0.0-beta3"))
api(platform("org.assertj:assertj-bom:3.27.3")) api(platform("org.assertj:assertj-bom:3.27.3"))
api(platform("org.eclipse.jetty:jetty-bom:12.1.0.alpha1")) api(platform("org.eclipse.jetty:jetty-bom:12.1.0.alpha1"))
@ -20,17 +20,17 @@ dependencies {
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.10.1")) api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.10.1"))
api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.8.0")) api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.8.0"))
api(platform("org.junit:junit-bom:5.12.0")) api(platform("org.junit:junit-bom:5.12.0"))
api(platform("org.mockito:mockito-bom:5.15.2")) api(platform("org.mockito:mockito-bom:5.16.0"))
constraints { constraints {
api("com.fasterxml:aalto-xml:1.3.2") api("com.fasterxml:aalto-xml:1.3.2")
api("com.fasterxml.woodstox:woodstox-core:6.7.0") api("com.fasterxml.woodstox:woodstox-core:6.7.0")
api("com.github.ben-manes.caffeine:caffeine:3.1.8") api("com.github.ben-manes.caffeine:caffeine:3.2.0")
api("com.github.librepdf:openpdf:1.3.43") api("com.github.librepdf:openpdf:1.3.43")
api("com.google.code.findbugs:findbugs:3.0.1") api("com.google.code.findbugs:findbugs:3.0.1")
api("com.google.code.findbugs:jsr305:3.0.2") api("com.google.code.findbugs:jsr305:3.0.2")
api("com.google.code.gson:gson:2.11.0") api("com.google.code.gson:gson:2.12.1")
api("com.google.protobuf:protobuf-java-util:4.29.3") api("com.google.protobuf:protobuf-java-util:4.30.0")
api("com.h2database:h2:2.3.232") api("com.h2database:h2:2.3.232")
api("com.jayway.jsonpath:json-path:2.9.0") api("com.jayway.jsonpath:json-path:2.9.0")
api("com.networknt:json-schema-validator:1.5.3") api("com.networknt:json-schema-validator:1.5.3")
@ -41,7 +41,7 @@ dependencies {
api("com.sun.xml.bind:jaxb-core:3.0.2") api("com.sun.xml.bind:jaxb-core:3.0.2")
api("com.sun.xml.bind:jaxb-impl:3.0.2") api("com.sun.xml.bind:jaxb-impl:3.0.2")
api("com.sun.xml.bind:jaxb-xjc:3.0.2") api("com.sun.xml.bind:jaxb-xjc:3.0.2")
api("com.thoughtworks.qdox:qdox:2.1.0") api("com.thoughtworks.qdox:qdox:2.2.0")
api("com.thoughtworks.xstream:xstream:1.4.21") api("com.thoughtworks.xstream:xstream:1.4.21")
api("commons-io:commons-io:2.15.0") api("commons-io:commons-io:2.15.0")
api("commons-logging:commons-logging:1.3.4") api("commons-logging:commons-logging:1.3.4")
@ -97,8 +97,8 @@ dependencies {
api("org.apache.derby:derby:10.16.1.1") api("org.apache.derby:derby:10.16.1.1")
api("org.apache.derby:derbyclient:10.16.1.1") api("org.apache.derby:derbyclient:10.16.1.1")
api("org.apache.derby:derbytools:10.16.1.1") api("org.apache.derby:derbytools:10.16.1.1")
api("org.apache.httpcomponents.client5:httpclient5:5.4.1") api("org.apache.httpcomponents.client5:httpclient5:5.4.2")
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.3.1") api("org.apache.httpcomponents.core5:httpcore5-reactive:5.3.3")
api("org.apache.poi:poi-ooxml:5.2.5") api("org.apache.poi:poi-ooxml:5.2.5")
api("org.apache.tomcat.embed:tomcat-embed-core:11.0.1") api("org.apache.tomcat.embed:tomcat-embed-core:11.0.1")
api("org.apache.tomcat.embed:tomcat-embed-websocket:11.0.1") api("org.apache.tomcat.embed:tomcat-embed-websocket:11.0.1")
@ -107,19 +107,19 @@ dependencies {
api("org.aspectj:aspectjrt:1.9.22.1") api("org.aspectj:aspectjrt:1.9.22.1")
api("org.aspectj:aspectjtools:1.9.22.1") api("org.aspectj:aspectjtools:1.9.22.1")
api("org.aspectj:aspectjweaver:1.9.22.1") api("org.aspectj:aspectjweaver:1.9.22.1")
api("org.awaitility:awaitility:4.2.2") api("org.awaitility:awaitility:4.3.0")
api("org.bouncycastle:bcpkix-jdk18on:1.72") api("org.bouncycastle:bcpkix-jdk18on:1.72")
api("org.codehaus.jettison:jettison:1.5.4") api("org.codehaus.jettison:jettison:1.5.4")
api("org.crac:crac:1.4.0") api("org.crac:crac:1.4.0")
api("org.dom4j:dom4j:2.1.4") api("org.dom4j:dom4j:2.1.4")
api("org.easymock:easymock:5.4.0") api("org.easymock:easymock:5.5.0")
api("org.eclipse.angus:angus-mail:2.0.3") api("org.eclipse.angus:angus-mail:2.0.3")
api("org.eclipse.jetty:jetty-reactive-httpclient:4.0.8") api("org.eclipse.jetty:jetty-reactive-httpclient:4.0.9")
api("org.eclipse.persistence:org.eclipse.persistence.jpa:5.0.0-B04") api("org.eclipse.persistence:org.eclipse.persistence.jpa:5.0.0-B04")
api("org.eclipse:yasson:3.0.4") api("org.eclipse:yasson:3.0.4")
api("org.ehcache:ehcache:3.10.8") api("org.ehcache:ehcache:3.10.8")
api("org.ehcache:jcache:1.0.1") api("org.ehcache:jcache:1.0.1")
api("org.freemarker:freemarker:2.3.33") api("org.freemarker:freemarker:2.3.34")
api("org.glassfish.external:opendmk_jmxremote_optional_jar:1.0-b01-ea") api("org.glassfish.external:opendmk_jmxremote_optional_jar:1.0-b01-ea")
api("org.glassfish:jakarta.el:4.0.2") api("org.glassfish:jakarta.el:4.0.2")
api("org.graalvm.sdk:graal-sdk:22.3.1") api("org.graalvm.sdk:graal-sdk:22.3.1")
@ -127,23 +127,23 @@ dependencies {
api("org.hibernate.orm:hibernate-core:7.0.0.Beta3") api("org.hibernate.orm:hibernate-core:7.0.0.Beta3")
api("org.hibernate.validator:hibernate-validator:9.0.0.CR1") api("org.hibernate.validator:hibernate-validator:9.0.0.CR1")
api("org.hsqldb:hsqldb:2.7.4") api("org.hsqldb:hsqldb:2.7.4")
api("org.htmlunit:htmlunit:4.6.0") api("org.htmlunit:htmlunit:4.10.0")
api("org.javamoney:moneta:1.4.4") api("org.javamoney:moneta:1.4.4")
api("org.jruby:jruby:9.4.9.0") api("org.jruby:jruby:9.4.12.0")
api("org.jspecify:jspecify:1.0.0") api("org.jspecify:jspecify:1.0.0")
api("org.junit.support:testng-engine:1.0.5") api("org.junit.support:testng-engine:1.0.5")
api("org.mozilla:rhino:1.7.15") api("org.mozilla:rhino:1.7.15")
api("org.ogce:xpp3:1.1.6") api("org.ogce:xpp3:1.1.6")
api("org.python:jython-standalone:2.7.3") api("org.python:jython-standalone:2.7.4")
api("org.quartz-scheduler:quartz:2.3.2") api("org.quartz-scheduler:quartz:2.3.2")
api("org.seleniumhq.selenium:htmlunit3-driver:4.26.0") api("org.seleniumhq.selenium:htmlunit3-driver:4.29.0")
api("org.seleniumhq.selenium:selenium-java:4.26.0") api("org.seleniumhq.selenium:selenium-java:4.29.0")
api("org.skyscreamer:jsonassert:2.0-rc1") api("org.skyscreamer:jsonassert:2.0-rc1")
api("org.testng:testng:7.11.0") api("org.testng:testng:7.11.0")
api("org.webjars:underscorejs:1.8.3") api("org.webjars:underscorejs:1.8.3")
api("org.webjars:webjars-locator-lite:1.0.0") api("org.webjars:webjars-locator-lite:1.1.0")
api("org.xmlunit:xmlunit-assertj:2.10.0") api("org.xmlunit:xmlunit-assertj:2.10.0")
api("org.xmlunit:xmlunit-matchers:2.10.0") api("org.xmlunit:xmlunit-matchers:2.10.0")
api("org.yaml:snakeyaml:2.3") api("org.yaml:snakeyaml:2.4")
} }
} }

3
spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreHttpHandlerAdapter.java

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -43,6 +43,7 @@ public class JettyCoreHttpHandlerAdapter extends Handler.Abstract.NonBlocking {
this.httpHandler = httpHandler; this.httpHandler = httpHandler;
} }
public void setDataBufferFactory(JettyDataBufferFactory dataBufferFactory) { public void setDataBufferFactory(JettyDataBufferFactory dataBufferFactory) {
Assert.notNull(dataBufferFactory, "DataBufferFactory must not be null"); Assert.notNull(dataBufferFactory, "DataBufferFactory must not be null");
this.dataBufferFactory = dataBufferFactory; this.dataBufferFactory = dataBufferFactory;

3
spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreServerHttpRequest.java

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -61,6 +61,7 @@ class JettyCoreServerHttpRequest extends AbstractServerHttpRequest {
this.request = request; this.request = request;
} }
@Override @Override
protected MultiValueMap<String, HttpCookie> initCookies() { protected MultiValueMap<String, HttpCookie> initCookies() {
List<org.eclipse.jetty.http.HttpCookie> httpCookies = Request.getCookies(this.request); List<org.eclipse.jetty.http.HttpCookie> httpCookies = Request.getCookies(this.request);

23
spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreServerHttpResponse.java

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -59,10 +59,10 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
super(dataBufferFactory, new HttpHeaders(new JettyHeadersAdapter(response.getHeaders()))); super(dataBufferFactory, new HttpHeaders(new JettyHeadersAdapter(response.getHeaders())));
this.response = response; this.response = response;
// remove all existing cookies from the response and add them to the cookie map, to be added back later // Remove all existing cookies from the response and add them to the cookie map, to be added back later
for (ListIterator<HttpField> i = this.response.getHeaders().listIterator(); i.hasNext(); ) { for (ListIterator<HttpField> it = this.response.getHeaders().listIterator(); it.hasNext();) {
HttpField f = i.next(); HttpField field = it.next();
if (f instanceof HttpCookieUtils.SetCookieHttpField setCookieHttpField) { if (field instanceof HttpCookieUtils.SetCookieHttpField setCookieHttpField) {
HttpCookie httpCookie = setCookieHttpField.getHttpCookie(); HttpCookie httpCookie = setCookieHttpField.getHttpCookie();
ResponseCookie responseCookie = ResponseCookie.from(httpCookie.getName(), httpCookie.getValue()) ResponseCookie responseCookie = ResponseCookie.from(httpCookie.getName(), httpCookie.getValue())
.httpOnly(httpCookie.isHttpOnly()) .httpOnly(httpCookie.isHttpOnly())
@ -72,8 +72,8 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
.secure(httpCookie.isSecure()) .secure(httpCookie.isSecure())
.partitioned(httpCookie.isPartitioned()) .partitioned(httpCookie.isPartitioned())
.build(); .build();
this.addCookie(responseCookie); addCookie(responseCookie);
i.remove(); it.remove();
} }
} }
} }
@ -94,7 +94,9 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
@Override @Override
protected void applyStatusCode() { protected void applyStatusCode() {
HttpStatusCode status = getStatusCode(); HttpStatusCode status = getStatusCode();
this.response.setStatus(status == null ? 0 : status.value()); if (status != null){
this.response.setStatus(status.value());
}
} }
@Override @Override
@ -103,7 +105,7 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
@Override @Override
protected void applyCookies() { protected void applyCookies() {
this.getCookies().values().stream() getCookies().values().stream()
.flatMap(List::stream) .flatMap(List::stream)
.forEach(cookie -> Response.addCookie(this.response, new ResponseHttpCookie(cookie))); .forEach(cookie -> Response.addCookie(this.response, new ResponseHttpCookie(cookie)));
} }
@ -165,12 +167,10 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
private final ResponseCookie responseCookie; private final ResponseCookie responseCookie;
ResponseHttpCookie(ResponseCookie responseCookie) { ResponseHttpCookie(ResponseCookie responseCookie) {
this.responseCookie = responseCookie; this.responseCookie = responseCookie;
} }
@Override @Override
public String getName() { public String getName() {
return this.responseCookie.getName(); return this.responseCookie.getName();
@ -231,7 +231,6 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
public Map<String, String> getAttributes() { public Map<String, String> getAttributes() {
return Collections.emptyMap(); return Collections.emptyMap();
} }
} }
} }

Loading…
Cancel
Save