Skip to content

refactor: rename Jdk9 sbt plugin to Jdk21#3075

Merged
He-Pin merged 1 commit into
mainfrom
refactor/rename-jdk9-to-jdk21
Jun 16, 2026
Merged

refactor: rename Jdk9 sbt plugin to Jdk21#3075
He-Pin merged 1 commit into
mainfrom
refactor/rename-jdk9-to-jdk21

Conversation

@He-Pin

@He-Pin He-Pin commented Jun 15, 2026

Copy link
Copy Markdown
Member

Motivation

The Jdk9 sbt plugin was historically named for JDK 9 features (e.g., java.util.concurrent.Flow), but since Java 17 became the minimum baseline, JDK 9 features are part of the standard build. The plugin's supportedJavaLTSVersions only contains "21" — it exclusively manages JDK 21+ source directories (virtual thread tests). The misleading name caused confusion for developers.

Modification

  • Renamed Jdk9Jdk21, CompileJdk9CompileJdk21, TestJdk9TestJdk21
  • Renamed files: Jdk9.scalaJdk21.scala, CopyrightHeaderForJdk9.scalaCopyrightHeaderForJdk21.scala, ScalaFixForJdk9Plugin.scalaScalaFixForJdk21Plugin.scala
  • Renamed PekkoDevelocityJdk9TestSettingsPluginPekkoDevelocityJdk21TestSettingsPlugin
  • Updated all references in build.sbt, project/*.scala, AGENTS.md
  • Updated CI workflows: build-test-prValidation.yml, dependency-graph.yml, generate-doc-check.yml
  • Cleaned up stale jdk9Only labels in TestExtras.scala (Flow tests are in regular source dirs since Java 17 is baseline)
  • Updated outdated comments: "requires jdk9+""project baseline is Java 17"
  • Updated CONTRIBUTING.md: "JDK > 10""JDK >= 17"
  • Cleaned up stale "jdk9+" references in docs test files and FlightRecording.scala

Result

Build plugin names now accurately reflect their function (JDK 21 virtual thread tests). Developers and CI workflows use the clearer TestJdk21 configuration name. Stale JDK 9 references that no longer apply with Java 17 baseline are removed.

Tests

  • sbt "actor-tests / compile" — success
  • sbt "actor-tests / TestJdk21 / compile" — success (3 Scala + 2 Java JDK 21 sources compiled to TestJdk21-classes)
  • sbt "headerCreateAll" — success
  • git diff --check — clean

References

None - build infrastructure cleanup

Motivation:
The Jdk9 sbt plugin was historically named for JDK 9 features (e.g., java.util.concurrent.Flow),
but since Java 17 became the minimum baseline, JDK 9 features are part of the standard build.
The plugin's supportedJavaLTSVersions only contains "21" — it exclusively manages JDK 21+
source directories (virtual thread tests). The misleading name caused confusion.

Modification:
- Renamed Jdk9 → Jdk21, CompileJdk9 → CompileJdk21, TestJdk9 → TestJdk21
- Renamed files: Jdk9.scala → Jdk21.scala, CopyrightHeaderForJdk9.scala → CopyrightHeaderForJdk21.scala,
  ScalaFixForJdk9Plugin.scala → ScalaFixForJdk21Plugin.scala
- Renamed PekkoDevelocityJdk9TestSettingsPlugin → PekkoDevelocityJdk21TestSettingsPlugin
- Updated all references in build.sbt, project/*.scala, AGENTS.md
- Updated CI workflows: build-test-prValidation.yml, dependency-graph.yml, generate-doc-check.yml
- Cleaned up stale jdk9Only labels in TestExtras.scala (Flow tests are in regular source dirs)
- Updated outdated comments: "requires jdk9+" → "project baseline is Java 17"
- Updated CONTRIBUTING.md: "JDK > 10" → "JDK >= 17"
- Cleaned up stale "jdk9+" references in docs test files and FlightRecording.scala

Result:
Build plugin names now accurately reflect their function (JDK 21 virtual thread tests).
Developers and CI workflows use the clearer TestJdk21 configuration name.
Stale JDK 9 references that no longer apply with Java 17 baseline are removed.

Tests:
- sbt "actor-tests / compile" — success
- sbt "actor-tests / TestJdk21 / compile" — success (3 Scala + 2 Java JDK 21 sources compiled)
- sbt "headerCreateAll" — success
- git diff --check — clean

References:
None - build infrastructure cleanup
@He-Pin He-Pin requested a review from pjfanning June 15, 2026 17:00
@He-Pin He-Pin added this to the 2.0.0-M4 milestone Jun 15, 2026
He-Pin added a commit to apache/pekko-connectors that referenced this pull request Jun 15, 2026
Motivation:
Java 17 is the project baseline. Comments annotating deprecations
introduced "in JDK 11+" or scalac options once unavailable on JDK 11
are now stating the obvious and add noise.

Modification:
- Drop the trailing `// deprecated in JDK 11+` comment from both
  `field.isAccessible()` call sites in
  `PekkoConnectorsResultMapperHelper.scala` (influxdb). The call itself
  is retained — only the now-redundant deprecation note is removed.
- Update stale `// JDK 11 ...` notes in `project/Common.scala` and
  `build.sbt` to `// project baseline is Java 17: ...` (aligned with
  apache/pekko#3075 comment style).

Result:
No behavior change. Comments now reflect the actual Java baseline.

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@He-Pin He-Pin merged commit 6482aa1 into main Jun 16, 2026
9 checks passed
@He-Pin He-Pin deleted the refactor/rename-jdk9-to-jdk21 branch June 16, 2026 02:39
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