From 90ad7f947d90158d1198bd7c165323a03770adb0 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Thu, 20 Aug 2026 12:40:31 +0200 Subject: [PATCH] Increase heap size for checkstyleNohttp task On a developer machine, the nohttp check scans the whole project directory, and things like local git worktrees can add enough extra content on disk to push the task past its previous 1g heap limit, causing an OutOfMemoryError. This goes beyond what was addressed by excluding the .claude folder from nohttp scanning in 48971139c02. This commit raises the heap size for checkstyleNohttp specifically to 1536m, leaving the limit for other Checkstyle tasks unchanged so as not to increase memory pressure on CI. --- .../java/org/springframework/build/CheckstyleConventions.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java b/buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java index d23795182c8..d067a60abde 100644 --- a/buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java +++ b/buildSrc/src/main/java/org/springframework/build/CheckstyleConventions.java @@ -48,7 +48,8 @@ public class CheckstyleConventions { configureNoHttpPlugin(project); } 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("checkstyleNohttp".equals(checkstyle.getName()) ? "1536m" : "1g")); CheckstyleExtension checkstyle = project.getExtensions().getByType(CheckstyleExtension.class); checkstyle.setToolVersion("13.10.0"); checkstyle.getConfigDirectory().set(project.getRootProject().file("src/checkstyle"));