8/migrate to java 17#12
Closed
jottinger wants to merge 2 commits intoDemchaAV:mainfrom
Closed
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
This was referenced May 9, 2026
Owner
|
Hi @jottinger — same note as on #11: this work is consolidated into PR #14 ( The remaining gaps your PR called out as out-of-scope (submodules) are addressed by the follow-up commit on #14:
CI on Temurin 17 (PR #14): 785 / 0 / 0 / 0. Thanks for the clean migration. |
Owner
|
Consolidated into #14. Thank you. |
DemchaAV
added a commit
that referenced
this pull request
May 9, 2026
* Updates module dependencies * Main focus is on bytebuddy, BUT * Also updates other dependencies to update CVE issues * Updating benchmarks dependencies for CI/CD * Updates code to conform to java 17 * 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 * v1.7 prep: complete the Java 17 baseline migration 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> * ci: run on PRs to any base + on develop pushes (so v1.7 prep PR triggers) * docs(changelog): reframe Java 17 baseline as v1.6.1 (patch), not v1.7 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. * ci: matrix Build+test across JDK 17 / 21 / 25 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. --------- Co-authored-by: Joseph Ottinger <joeo@enigmastation.com>
This was referenced May 9, 2026
Closed
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.
Fixes #8
Includes base branch from #10
Note that benchmarks has NOT been fully tested.