Skip to content

Commit

Permalink
Merge branch '6.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Apr 5, 2024
2 parents dcab1f2 + 67a8100 commit 03dd8e2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void apply(Project project) {
project.getPlugins().apply(CheckstylePlugin.class);
project.getTasks().withType(Checkstyle.class).forEach(checkstyle -> checkstyle.getMaxHeapSize().set("1g"));
CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class);
checkstyle.setToolVersion("10.14.2");
checkstyle.setToolVersion("10.15.0");
checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle"));
String version = SpringJavaFormatPlugin.class.getPackage().getImplementationVersion();
DependencySet checkstyleDependencies = project.getConfigurations().getByName("checkstyle").getDependencies();
Expand Down
22 changes: 11 additions & 11 deletions framework-platform/framework-platform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ javaPlatform {
dependencies {
api(platform("com.fasterxml.jackson:jackson-bom:2.15.4"))
api(platform("io.micrometer:micrometer-bom:1.12.4"))
api(platform("io.netty:netty-bom:4.1.107.Final"))
api(platform("io.netty:netty-bom:4.1.108.Final"))
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))
api(platform("io.projectreactor:reactor-bom:2023.0.4"))
api(platform("io.rsocket:rsocket-bom:1.1.3"))
api(platform("org.apache.groovy:groovy-bom:4.0.19"))
api(platform("org.apache.groovy:groovy-bom:4.0.20"))
api(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
api(platform("org.assertj:assertj-bom:3.25.3"))
api(platform("org.eclipse.jetty:jetty-bom:12.0.7"))
Expand All @@ -25,9 +25,9 @@ dependencies {

constraints {
api("com.fasterxml:aalto-xml:1.3.2")
api("com.fasterxml.woodstox:woodstox-core:6.6.1")
api("com.fasterxml.woodstox:woodstox-core:6.6.2")
api("com.github.ben-manes.caffeine:caffeine:3.1.8")
api("com.github.librepdf:openpdf:1.3.42")
api("com.github.librepdf:openpdf:1.3.43")
api("com.google.code.findbugs:findbugs:3.0.1")
api("com.google.code.findbugs:jsr305:3.0.2")
api("com.google.code.gson:gson:2.10.1")
Expand Down Expand Up @@ -102,13 +102,13 @@ dependencies {
api("org.apache.httpcomponents.client5:httpclient5:5.3.1")
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.2.4")
api("org.apache.poi:poi-ooxml:5.2.5")
api("org.apache.tomcat.embed:tomcat-embed-core:10.1.19")
api("org.apache.tomcat.embed:tomcat-embed-websocket:10.1.19")
api("org.apache.tomcat:tomcat-util:10.1.19")
api("org.apache.tomcat:tomcat-websocket:10.1.19")
api("org.aspectj:aspectjrt:1.9.21.1")
api("org.aspectj:aspectjtools:1.9.21.1")
api("org.aspectj:aspectjweaver:1.9.21.1")
api("org.apache.tomcat.embed:tomcat-embed-core:10.1.20")
api("org.apache.tomcat.embed:tomcat-embed-websocket:10.1.20")
api("org.apache.tomcat:tomcat-util:10.1.20")
api("org.apache.tomcat:tomcat-websocket:10.1.20")
api("org.aspectj:aspectjrt:1.9.22")
api("org.aspectj:aspectjtools:1.9.22")
api("org.aspectj:aspectjweaver:1.9.22")
api("org.awaitility:awaitility:4.2.0")
api("org.bouncycastle:bcpkix-jdk18on:1.72")
api("org.codehaus.jettison:jettison:1.5.4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ public static Publisher<?> invokeSuspendingFunction(
Object arg = args[index];
if (!(parameter.isOptional() && arg == null)) {
KType type = parameter.getType();
if (!(type.isMarkedNullable() && arg == null) && type.getClassifier() instanceof KClass<?> kClass
&& KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(kClass))) {
if (!(type.isMarkedNullable() && arg == null) &&
type.getClassifier() instanceof KClass<?> kClass &&
KotlinDetector.isInlineClass(JvmClassMappingKt.getJavaClass(kClass))) {
KFunction<?> constructor = KClasses.getPrimaryConstructor(kClass);
if (!KCallablesJvm.isAccessible(constructor)) {
KCallablesJvm.setAccessible(constructor, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ protected void handleParseFailure(Throwable ex) {
String msg = cause.getMessage();
if (msg != null) {
msg = msg.toLowerCase();
if (msg.contains("exceed") && (msg.contains("size") || msg.contains("length"))) {
if ((msg.contains("exceed") && (msg.contains("size") || msg.contains("length"))) ||
(msg.contains("request") && (msg.contains("big") || msg.contains("large")))) {
throw new MaxUploadSizeExceededException(-1, ex);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ void jetty12MaxLengthExceededException() {
.isThrownBy(() -> requestWithException(ex)).withCause(ex);
}

@Test // gh-32549
void undertowRequestTooBigException() {
IOException ex = new IOException("Connection terminated as request was larger than 10000");

assertThatExceptionOfType(MaxUploadSizeExceededException.class)
.isThrownBy(() -> requestWithException(ex)).withCause(ex);
}


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

private static StandardMultipartHttpServletRequest requestWithException(IOException ex) {
MockHttpServletRequest request = new MockHttpServletRequest() {
@Override
public Collection<Part> getParts() throws IOException {
throw ex;
}
};
return new StandardMultipartHttpServletRequest(request);
}

}

0 comments on commit 03dd8e2

Please sign in to comment.