v1.6.1 prep: Java 17 baseline migration#14
Merged
Conversation
* Main focus is on bytebuddy, BUT * Also updates other dependencies to update CVE issues
* Does not fully address submodules, as they're out of scope and should be backwards compatible anyway * Migrates pattern-matched switch to alternatives * Migrates new List access methods to alternatives * Changes PreviewCompiler in src/test/java to use Maven-specified compiler version
Builds on @jottinger's three commits cherry-picked above: - 5b7d6d4 Updates module dependencies (=#11 base) - 2e32eb5 Updating benchmarks dependencies (=#11 follow-up) - af1f82a Updates code to conform to java 17 (=#12) Follow-up gaps closed by this commit: - examples/pom.xml — flip <maven.compiler.release> 21 → 17 (only the root and benchmarks POMs were flipped upstream). - examples/.../WeeklyScheduleRenderer.java — rewrite the two switch-with-deconstruction blocks (DayShift / Half) plus the StatusFill instanceof-with-record-pattern check as Java 17–compatible instanceof if-else chains. Records still expose status() / shift() / lunch() / dinner() so call sites are a one-line refactor each. - benchmarks/.../BenchmarkMedianTool.java — 9× List.getFirst() → .get(0) (List.getFirst is JEP 431, Java 21). - benchmarks/.../ComparativeBenchmark.java — Thread.threadId() → Thread.getId() (threadId is Java 19+). - .github/workflows/ci.yml — actions/setup-java java-version '21' → '17' across all five jobs. - README.md — Java-21 badge → Java-17+. - CHANGELOG.md — new "## v1.7.0 — Planned" entry detailing the Java 17 baseline, dependency refresh, and Maven Central distribution plan; credits @jottinger upfront. Local verification on this worktree: - ./mvnw -B -ntp clean verify -pl . → 785 / 0 / 0 / 0 - ./mvnw -B -ntp -f examples/pom.xml clean compile → BUILD SUCCESS - ./mvnw -B -ntp -f benchmarks/pom.xml clean compile → BUILD SUCCESS Note: local Maven runs on Java 21 with -release 17, which catches compile-time API drift but not runtime-only Java 21 hooks. The draft PR's CI run on Temurin JDK 17 is the truth source for that. Co-Authored-By: Joseph Ottinger <joeo@enigmastation.com>
This was referenced May 9, 2026
Closed
SemVer-correct framing: this PR adds no public API, doesn't break v1.6.0 callers, and is mostly compatibility expansion + dependency hygiene. That's a patch, not a minor. Maven Central distribution (the only true minor-level change in the prior framing) stays queued for the actual v1.7.0 alongside the JMH migration.
Each push and PR now runs the full canonical test suite (~819
tests, mvnw verify) against three JDKs in parallel:
- JDK 17 — the baseline target (compiler.release=17). Lowest
common denominator; what enterprise stacks deploy on.
- JDK 21 — the previous baseline. Validates that bytecode-17
still runs cleanly on the post-Java-21 sequenced-collections
JVM after the getFirst()/getLast()/threadId() rewrites.
- JDK 25 — the current LTS. Validates the byte-buddy 1.18.7 +
mockito 5.23 dependency bumps that #10 motivated; without
those, mockito breaks on the JDK 25 access rules.
fail-fast: false so a regression on one JDK doesn't mask the
status of the others. Javadoc generation runs only on JDK 17 —
its output is JVM-independent, no need to triple-bake.
The other jobs (Architecture+Documentation Guards, Examples
Generation Smoke Test, Performance Smoke Check, Weekly Benchmark
Diff) stay single-JDK on 17 — they're fast enough that adding
parallel JDKs adds no signal, and benchmark numbers across JVMs
would be noisy comparisons rather than a regression gate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
Maintenance + compatibility patch for v1.6.1. Drops the Java 21 source/target baseline to Java 17+ so the library can ship into older enterprise stacks without a fork, and refreshes test/build dependencies (incl. CVE pass). No public API change — engine, DSL, themes, templates, and backend records all stay source-compatible with v1.6.0; existing callers compile and behave unchanged.
Co-developed with @jottinger via #11 (deps refresh + ByteBuddy for Java 25 compat) and #12 (engine source migration to Java 17). Their three commits are preserved at the bottom of this branch with original authorship; the top commits close the gaps those PRs left.
Closes #8 · supersedes #11 · supersedes #12.
What's in the branch (oldest → newest)
5b7d6d4f2e32eb5daf1f82af11d48d1f2b1f64f1eda21695Gaps closed by my follow-up commits
examples/pom.xml<maven.compiler.release>21 → 17 (upstream only flipped root + benchmarks).examples/.../WeeklyScheduleRenderer.java— two switch-with-deconstruction blocks (DayShift/Half) and oneinstanceof Half.StatusFill(ShiftStatus)rewritten as Java 17instanceofif-else chains.benchmarks/.../BenchmarkMedianTool.java— 9×List.getFirst()→.get(0)(JEP 431, Java 21).benchmarks/.../ComparativeBenchmark.java— 2×Thread.currentThread().threadId()→.getId()(threadId is Java 19+)..github/workflows/ci.yml—actions/setup-javajava-version: '21'→'17'across all five jobs; trigger relaxed to run on PRs to any base branch + on develop pushes (otherwise feature-branch PRs wouldn't trigger CI).README.md— Java-21 badge → Java-17+.CHANGELOG.md— new## v1.6.1 — Plannedentry detailing the Java 17 baseline + dependency refresh, with @jottinger credited upfront. Maven Central note moved to "queued for v1.7".Verification
./mvnw -B -ntp -f examples/pom.xml clean compile./mvnw -B -ntp -f benchmarks/pom.xml clean compilegetFirst,getLast,threadId, switch-with-deconstruction) acrosssrc/,examples/src/,benchmarks/src/Release plan
pwsh ./scripts/cut-release.ps1 -Version 1.6.1after merge — script flips POMs to 1.6.1, dates the CHANGELOG entry, commits + tags v1.6.1, pushes.Status
🚧 Draft. Ready to flip to "Ready for review" once @DemchaAV eyeballs the diff and approves the merge plan.