Skip to content

Commit 90ddb40

Browse files
committed
Upgrade to Jetty 12.0.17 and Jetty Reactive HttpClient 4.0.9
Includes Apache HttpClient 5.4.1, Netty 4.1.119, Jackson 2.18.3, Gson 2.12.1, FreeMarker 2.3.34, Protobuf 4.30, Groovy 4.0.26, Jython 2.7.4, JRuby 9.4.12, Caffeine 3.2, QDox 2.2, Awaitility 4.3, EasyMock 5.5, HtmlUnit 4.10 Closes gh-34561
1 parent 143985e commit 90ddb40

File tree

4 files changed

+40
-39
lines changed

4 files changed

+40
-39
lines changed

framework-platform/framework-platform.gradle

+25-25
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ javaPlatform {
77
}
88

99
dependencies {
10-
api(platform("com.fasterxml.jackson:jackson-bom:2.18.2"))
10+
api(platform("com.fasterxml.jackson:jackson-bom:2.18.3"))
1111
api(platform("io.micrometer:micrometer-bom:1.14.4"))
12-
api(platform("io.netty:netty-bom:4.1.118.Final"))
12+
api(platform("io.netty:netty-bom:4.1.119.Final"))
1313
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))
1414
api(platform("io.projectreactor:reactor-bom:2024.0.3"))
1515
api(platform("io.rsocket:rsocket-bom:1.1.5"))
16-
api(platform("org.apache.groovy:groovy-bom:4.0.24"))
16+
api(platform("org.apache.groovy:groovy-bom:4.0.26"))
1717
api(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
1818
api(platform("org.assertj:assertj-bom:3.27.3"))
19-
api(platform("org.eclipse.jetty:jetty-bom:12.0.16"))
20-
api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.16"))
19+
api(platform("org.eclipse.jetty:jetty-bom:12.0.17"))
20+
api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.17"))
2121
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1"))
2222
api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3"))
2323
api(platform("org.junit:junit-bom:5.11.4"))
24-
api(platform("org.mockito:mockito-bom:5.15.2"))
24+
api(platform("org.mockito:mockito-bom:5.16.0"))
2525

2626
constraints {
2727
api("com.fasterxml:aalto-xml:1.3.2")
2828
api("com.fasterxml.woodstox:woodstox-core:6.7.0")
29-
api("com.github.ben-manes.caffeine:caffeine:3.1.8")
29+
api("com.github.ben-manes.caffeine:caffeine:3.2.0")
3030
api("com.github.librepdf:openpdf:1.3.43")
3131
api("com.google.code.findbugs:findbugs:3.0.1")
3232
api("com.google.code.findbugs:jsr305:3.0.2")
33-
api("com.google.code.gson:gson:2.11.0")
34-
api("com.google.protobuf:protobuf-java-util:4.29.3")
33+
api("com.google.code.gson:gson:2.12.1")
34+
api("com.google.protobuf:protobuf-java-util:4.30.0")
3535
api("com.h2database:h2:2.3.232")
3636
api("com.jayway.jsonpath:json-path:2.9.0")
3737
api("com.oracle.database.jdbc:ojdbc11:21.9.0.0")
@@ -43,7 +43,7 @@ dependencies {
4343
api("com.sun.xml.bind:jaxb-core:3.0.2")
4444
api("com.sun.xml.bind:jaxb-impl:3.0.2")
4545
api("com.sun.xml.bind:jaxb-xjc:3.0.2")
46-
api("com.thoughtworks.qdox:qdox:2.1.0")
46+
api("com.thoughtworks.qdox:qdox:2.2.0")
4747
api("com.thoughtworks.xstream:xstream:1.4.21")
4848
api("commons-io:commons-io:2.15.0")
4949
api("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.2")
@@ -100,8 +100,8 @@ dependencies {
100100
api("org.apache.derby:derby:10.16.1.1")
101101
api("org.apache.derby:derbyclient:10.16.1.1")
102102
api("org.apache.derby:derbytools:10.16.1.1")
103-
api("org.apache.httpcomponents.client5:httpclient5:5.4.1")
104-
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.3.1")
103+
api("org.apache.httpcomponents.client5:httpclient5:5.4.2")
104+
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.3.3")
105105
api("org.apache.poi:poi-ooxml:5.2.5")
106106
api("org.apache.tomcat.embed:tomcat-embed-core:10.1.28")
107107
api("org.apache.tomcat.embed:tomcat-embed-websocket:10.1.28")
@@ -110,18 +110,18 @@ dependencies {
110110
api("org.aspectj:aspectjrt:1.9.22.1")
111111
api("org.aspectj:aspectjtools:1.9.22.1")
112112
api("org.aspectj:aspectjweaver:1.9.22.1")
113-
api("org.awaitility:awaitility:4.2.2")
113+
api("org.awaitility:awaitility:4.3.0")
114114
api("org.bouncycastle:bcpkix-jdk18on:1.72")
115115
api("org.codehaus.jettison:jettison:1.5.4")
116116
api("org.crac:crac:1.4.0")
117117
api("org.dom4j:dom4j:2.1.4")
118-
api("org.easymock:easymock:5.4.0")
119-
api("org.eclipse.jetty:jetty-reactive-httpclient:4.0.8")
118+
api("org.easymock:easymock:5.5.0")
119+
api("org.eclipse.jetty:jetty-reactive-httpclient:4.0.9")
120120
api("org.eclipse.persistence:org.eclipse.persistence.jpa:3.0.4")
121121
api("org.eclipse:yasson:2.0.4")
122122
api("org.ehcache:ehcache:3.10.8")
123123
api("org.ehcache:jcache:1.0.1")
124-
api("org.freemarker:freemarker:2.3.33")
124+
api("org.freemarker:freemarker:2.3.34")
125125
api("org.glassfish.external:opendmk_jmxremote_optional_jar:1.0-b01-ea")
126126
api("org.glassfish:jakarta.el:4.0.2")
127127
api("org.glassfish.tyrus:tyrus-container-servlet:2.1.3")
@@ -130,24 +130,24 @@ dependencies {
130130
api("org.hibernate:hibernate-core-jakarta:5.6.15.Final")
131131
api("org.hibernate:hibernate-validator:7.0.5.Final")
132132
api("org.hsqldb:hsqldb:2.7.4")
133-
api("org.htmlunit:htmlunit:4.6.0")
133+
api("org.htmlunit:htmlunit:4.10.0")
134134
api("org.javamoney:moneta:1.4.4")
135-
api("org.jruby:jruby:9.4.9.0")
135+
api("org.jruby:jruby:9.4.12.0")
136136
api("org.junit.support:testng-engine:1.0.5")
137137
api("org.mozilla:rhino:1.7.15")
138138
api("org.ogce:xpp3:1.1.6")
139-
api("org.python:jython-standalone:2.7.3")
139+
api("org.python:jython-standalone:2.7.4")
140140
api("org.quartz-scheduler:quartz:2.3.2")
141-
api("org.seleniumhq.selenium:htmlunit3-driver:4.26.0")
142-
api("org.seleniumhq.selenium:selenium-java:4.26.0")
141+
api("org.seleniumhq.selenium:htmlunit3-driver:4.29.0")
142+
api("org.seleniumhq.selenium:selenium-java:4.29.0")
143143
api("org.skyscreamer:jsonassert:1.5.3")
144-
api("org.slf4j:slf4j-api:2.0.16")
144+
api("org.slf4j:slf4j-api:2.0.17")
145145
api("org.testng:testng:7.11.0")
146146
api("org.webjars:underscorejs:1.8.3")
147-
api("org.webjars:webjars-locator-core:0.55")
148-
api("org.webjars:webjars-locator-lite:1.0.0")
147+
api("org.webjars:webjars-locator-core:0.59")
148+
api("org.webjars:webjars-locator-lite:1.1.0")
149149
api("org.xmlunit:xmlunit-assertj:2.10.0")
150150
api("org.xmlunit:xmlunit-matchers:2.10.0")
151-
api("org.yaml:snakeyaml:2.3")
151+
api("org.yaml:snakeyaml:2.4")
152152
}
153153
}

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,6 +43,7 @@ public JettyCoreHttpHandlerAdapter(HttpHandler httpHandler) {
4343
this.httpHandler = httpHandler;
4444
}
4545

46+
4647
public void setDataBufferFactory(JettyDataBufferFactory dataBufferFactory) {
4748
Assert.notNull(dataBufferFactory, "DataBufferFactory must not be null");
4849
this.dataBufferFactory = dataBufferFactory;

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -61,6 +61,7 @@ public JettyCoreServerHttpRequest(Request request, JettyDataBufferFactory dataBu
6161
this.request = request;
6262
}
6363

64+
6465
@Override
6566
protected MultiValueMap<String, HttpCookie> initCookies() {
6667
List<org.eclipse.jetty.http.HttpCookie> httpCookies = Request.getCookies(this.request);

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

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -59,10 +59,10 @@ public JettyCoreServerHttpResponse(Response response, JettyDataBufferFactory dat
5959
super(dataBufferFactory, new HttpHeaders(new JettyHeadersAdapter(response.getHeaders())));
6060
this.response = response;
6161

62-
// remove all existing cookies from the response and add them to the cookie map, to be added back later
63-
for (ListIterator<HttpField> i = this.response.getHeaders().listIterator(); i.hasNext(); ) {
64-
HttpField f = i.next();
65-
if (f instanceof HttpCookieUtils.SetCookieHttpField setCookieHttpField) {
62+
// Remove all existing cookies from the response and add them to the cookie map, to be added back later
63+
for (ListIterator<HttpField> it = this.response.getHeaders().listIterator(); it.hasNext();) {
64+
HttpField field = it.next();
65+
if (field instanceof HttpCookieUtils.SetCookieHttpField setCookieHttpField) {
6666
HttpCookie httpCookie = setCookieHttpField.getHttpCookie();
6767
ResponseCookie responseCookie = ResponseCookie.from(httpCookie.getName(), httpCookie.getValue())
6868
.httpOnly(httpCookie.isHttpOnly())
@@ -72,8 +72,8 @@ public JettyCoreServerHttpResponse(Response response, JettyDataBufferFactory dat
7272
.secure(httpCookie.isSecure())
7373
.partitioned(httpCookie.isPartitioned())
7474
.build();
75-
this.addCookie(responseCookie);
76-
i.remove();
75+
addCookie(responseCookie);
76+
it.remove();
7777
}
7878
}
7979
}
@@ -94,7 +94,9 @@ protected Mono<Void> writeAndFlushWithInternal(Publisher<? extends Publisher<? e
9494
@Override
9595
protected void applyStatusCode() {
9696
HttpStatusCode status = getStatusCode();
97-
this.response.setStatus(status == null ? 0 : status.value());
97+
if (status != null){
98+
this.response.setStatus(status.value());
99+
}
98100
}
99101

100102
@Override
@@ -103,7 +105,7 @@ protected void applyHeaders() {
103105

104106
@Override
105107
protected void applyCookies() {
106-
this.getCookies().values().stream()
108+
getCookies().values().stream()
107109
.flatMap(List::stream)
108110
.forEach(cookie -> Response.addCookie(this.response, new ResponseHttpCookie(cookie)));
109111
}
@@ -165,12 +167,10 @@ private static class ResponseHttpCookie implements org.eclipse.jetty.http.HttpCo
165167

166168
private final ResponseCookie responseCookie;
167169

168-
169170
ResponseHttpCookie(ResponseCookie responseCookie) {
170171
this.responseCookie = responseCookie;
171172
}
172173

173-
174174
@Override
175175
public String getName() {
176176
return this.responseCookie.getName();
@@ -235,7 +235,6 @@ public boolean isPartitioned() {
235235
public Map<String, String> getAttributes() {
236236
return Collections.emptyMap();
237237
}
238-
239238
}
240239

241240
}

0 commit comments

Comments
 (0)