Skip to content

fix: add jboss-threads 3.9.2 to Undertow feature for Java 25 compatibility#15427

Merged
jamesfredley merged 1 commit into7.0.xfrom
fix/undertow-jboss-threads-java25
Feb 21, 2026
Merged

fix: add jboss-threads 3.9.2 to Undertow feature for Java 25 compatibility#15427
jamesfredley merged 1 commit into7.0.xfrom
fix/undertow-jboss-threads-java25

Conversation

@jamesfredley
Copy link
Contributor

Summary

  • When Undertow is selected as the servlet container in grails-forge, the generated build.gradle now includes runtimeOnly "org.jboss.threads:jboss-threads:3.9.2"
  • This fixes the sun.misc.Unsafe::objectFieldOffset warning on Java 25 caused by undertow-core pulling in jboss-threads 3.7.0, which calls the terminally deprecated API in its static initializer
  • Version is managed centrally in the forge's pom.xml using the lookupArtifactId pattern, consistent with how other third-party dependency versions are stored

Changes

File Change
grails-forge/.../pom.xml Added jboss-threads:3.9.2 dependency entry
grails-forge/.../SpringBootUndertowFeature.java Added runtimeOnly dependency via lookupArtifactId
grails-forge/.../SpringBootSpec.groovy Added test verifying jboss-threads appears in generated build

Testing

All 5 SpringBootSpec tests pass, including the new test undertow servlet includes jboss-threads dependency test.

…ility

When Undertow is selected as the servlet container, undertow-core
transitively pulls in jboss-threads 3.7.0 which calls the terminally
deprecated sun.misc.Unsafe::objectFieldOffset in its static initializer,
producing a warning on Java 25. Pin jboss-threads to 3.9.2 as a
runtimeOnly dependency to resolve this.

Assisted-by: Claude Code <Claude@Claude.ai>
@jamesfredley jamesfredley force-pushed the fix/undertow-jboss-threads-java25 branch from c0a647b to 13d86ab Compare February 21, 2026 01:20
@jamesfredley jamesfredley marked this pull request as ready for review February 21, 2026 01:20
Copilot AI review requested due to automatic review settings February 21, 2026 01:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds JBoss Threads 3.9.2 as a runtime dependency when Undertow is selected as the servlet container in grails-forge to fix a Java 25 compatibility warning. The older version (3.7.0) pulled in transitively by undertow-core uses the terminally deprecated sun.misc.Unsafe::objectFieldOffset method.

Changes:

  • Added jboss-threads 3.9.2 to the central pom.xml for version management
  • Modified SpringBootUndertowFeature to include jboss-threads as a runtimeOnly dependency
  • Added test coverage verifying the jboss-threads dependency appears in generated builds

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
grails-forge/grails-forge-core/src/main/resources/pom.xml Added jboss-threads 3.9.2 dependency entry with explanatory comment about Java 25 compatibility
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/spring/SpringBootUndertowFeature.java Added runtimeOnly jboss-threads dependency using lookupArtifactId pattern
grails-forge/grails-forge-core/src/test/groovy/org/grails/forge/feature/spring/SpringBootSpec.groovy Added test verifying jboss-threads dependency is included when Undertow is selected

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jamesfredley jamesfredley merged commit f4f9120 into 7.0.x Feb 21, 2026
36 checks passed
@jamesfredley jamesfredley deleted the fix/undertow-jboss-threads-java25 branch February 21, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants