Skip to content

Commit 03dd8e2

Browse files
committed
Merge branch '6.1.x'
2 parents dcab1f2 + 67a8100 commit 03dd8e2

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void apply(Project project) {
5050
project.getPlugins().apply(CheckstylePlugin.class);
5151
project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g"));
5252
CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class);
53-
checkstyle.setToolVersion("10.14.2");
53+
checkstyle.setToolVersion("10.15.0");
5454
checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle"));
5555
String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion();
5656
DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies();

framework-platform/framework-platform.gradle

+11-11
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ javaPlatform {
99
dependencies {
1010
api(platform("com.fasterxml.jackson:jackson-bom:2.15.4"))
1111
api(platform("io.micrometer:micrometer-bom:1.12.4"))
12-
api(platform("io.netty:netty-bom:4.1.107.Final"))
12+
api(platform("io.netty:netty-bom:4.1.108.Final"))
1313
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))
1414
api(platform("io.projectreactor:reactor-bom:2023.0.4"))
1515
api(platform("io.rsocket:rsocket-bom:1.1.3"))
16-
api(platform("org.apache.groovy:groovy-bom:4.0.19"))
16+
api(platform("org.apache.groovy:groovy-bom:4.0.20"))
1717
api(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
1818
api(platform("org.assertj:assertj-bom:3.25.3"))
1919
api(platform("org.eclipse.jetty:jetty-bom:12.0.7"))
@@ -25,9 +25,9 @@ dependencies {
2525

2626
constraints {
2727
api("com.fasterxml:aalto-xml:1.3.2")
28-
api("com.fasterxml.woodstox:woodstox-core:6.6.1")
28+
api("com.fasterxml.woodstox:woodstox-core:6.6.2")
2929
api("com.github.ben-manes.caffeine:caffeine:3.1.8")
30-
api("com.github.librepdf:openpdf:1.3.42")
30+
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")
3333
api("com.google.code.gson:gson:2.10.1")
@@ -102,13 +102,13 @@ dependencies {
102102
api("org.apache.httpcomponents.client5:httpclient5:5.3.1")
103103
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.2.4")
104104
api("org.apache.poi:poi-ooxml:5.2.5")
105-
api("org.apache.tomcat.embed:tomcat-embed-core:10.1.19")
106-
api("org.apache.tomcat.embed:tomcat-embed-websocket:10.1.19")
107-
api("org.apache.tomcat:tomcat-util:10.1.19")
108-
api("org.apache.tomcat:tomcat-websocket:10.1.19")
109-
api("org.aspectj:aspectjrt:1.9.21.1")
110-
api("org.aspectj:aspectjtools:1.9.21.1")
111-
api("org.aspectj:aspectjweaver:1.9.21.1")
105+
api("org.apache.tomcat.embed:tomcat-embed-core:10.1.20")
106+
api("org.apache.tomcat.embed:tomcat-embed-websocket:10.1.20")
107+
api("org.apache.tomcat:tomcat-util:10.1.20")
108+
api("org.apache.tomcat:tomcat-websocket:10.1.20")
109+
api("org.aspectj:aspectjrt:1.9.22")
110+
api("org.aspectj:aspectjtools:1.9.22")
111+
api("org.aspectj:aspectjweaver:1.9.22")
112112
api("org.awaitility:awaitility:4.2.0")
113113
api("org.bouncycastle:bcpkix-jdk18on:1.72")
114114
api("org.codehaus.jettison:jettison:1.5.4")

spring-core/src/main/java/org/springframework/core/CoroutinesUtils.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ public static Publisher<?> invokeSuspendingFunction(
128128
Object arg = args[index];
129129
if (!(parameter.isOptional() && arg == null)) {
130130
KType type = parameter.getType();
131-
if (!(type.isMarkedNullable() && arg == null) && type.getClassifier() instanceof KClass<?> kClass
132-
&& KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(kClass))) {
131+
if (!(type.isMarkedNullable() && arg == null) &&
132+
type.getClassifier() instanceof KClass<?> kClass &&
133+
KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(kClass))) {
133134
KFunction<?> constructor = KClasses.getPrimaryConstructor(kClass);
134135
if (!KCallablesJvm.isAccessible(constructor)) {
135136
KCallablesJvm.setAccessible(constructor, true);

spring-web/src/main/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ protected void handleParseFailure(Throwable ex) {
119119
String msg = cause.getMessage();
120120
if (msg != null) {
121121
msg = msg.toLowerCase();
122-
if (msg.contains("exceed") && (msg.contains("size") || msg.contains("length"))) {
122+
if ((msg.contains("exceed") && (msg.contains("size") || msg.contains("length"))) ||
123+
(msg.contains("request") && (msg.contains("big") || msg.contains("large")))) {
123124
throw new MaxUploadSizeExceededException(-1, ex);
124125
}
125126
}

spring-web/src/test/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequestTests.java

+18
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ void jetty12MaxLengthExceededException() {
123123
.isThrownBy(() -> requestWithException(ex)).withCause(ex);
124124
}
125125

126+
@Test // gh-32549
127+
void undertowRequestTooBigException() {
128+
IOException ex = new IOException("Connection terminated as request was larger than 10000");
129+
130+
assertThatExceptionOfType(MaxUploadSizeExceededException.class)
131+
.isThrownBy(() -> requestWithException(ex)).withCause(ex);
132+
}
133+
126134

127135
private static StandardMultipartHttpServletRequest requestWithPart(String name, String disposition, String content) {
128136
MockHttpServletRequest request = new MockHttpServletRequest();
@@ -142,4 +150,14 @@ public Collection<Part> getParts() throws ServletException {
142150
return new StandardMultipartHttpServletRequest(request);
143151
}
144152

153+
private static StandardMultipartHttpServletRequest requestWithException(IOException ex) {
154+
MockHttpServletRequest request = new MockHttpServletRequest() {
155+
@Override
156+
public Collection<Part> getParts() throws IOException {
157+
throw ex;
158+
}
159+
};
160+
return new StandardMultipartHttpServletRequest(request);
161+
}
162+
145163
}

0 commit comments

Comments
 (0)