Skip to content

Support building with java 21#6160

Merged
ctubbsii merged 1 commit intoapache:2.1from
ctubbsii:jdk-21-build
Feb 28, 2026
Merged

Support building with java 21#6160
ctubbsii merged 1 commit intoapache:2.1from
ctubbsii:jdk-21-build

Conversation

@ctubbsii
Copy link
Member

@ctubbsii ctubbsii commented Feb 27, 2026

  • Require Java 21 for build (does not change runtime requirements)
  • Update GitHub Actions workflows
  • Update ASF Parent POM to latest and update some plugins
  • Fix some issues caught by the new compiler and/or spotbugs
  • Suppress 'this-escape' category of compiler checks, because of too
    many false-positive issues, including with generated thrift code that
    is hard to suppress on a case-by-case basis
  • Add dependency exclusion analysis (checks for unnecessary exclusions)
  • Update errorprone to work with Java 21

@ctubbsii ctubbsii added this to the 2.1.5 milestone Feb 27, 2026
@ctubbsii ctubbsii self-assigned this Feb 27, 2026
@ctubbsii ctubbsii marked this pull request as ready for review February 27, 2026 22:49
@ctubbsii ctubbsii changed the title WIP Support building with java 21 Support building with java 21 Feb 27, 2026
* Require Java 21 for build (does not change runtime requirements)
* Update GitHub Actions workflows
* Update ASF Parent POM to latest and update some plugins
* Fix some issues caught by the new compiler and/or spotbugs
* Suppress 'this-escape' category of compiler checks, because of too
  many false-positive issues, including with generated thrift code that
  is hard to suppress on a case-by-case basis
* Add dependency exclusion analysis (checks for unnecessary exclusions)
* Update errorprone to work with Java 21
@ctubbsii
Copy link
Member Author

I ran mvn clean verify javadoc:jar -Psunny with these changes, and everything passed fine. If we want to still allow building with Java 17, we'd have to avoid upgrading checkstyle, and move the -Xlint:-this-escape argument to a profile, which makes things more complicated.

@ctubbsii ctubbsii merged commit f3f392f into apache:2.1 Feb 28, 2026
8 checks passed
@ctubbsii ctubbsii deleted the jdk-21-build branch February 28, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants