Skip to content

Enable generic bytecode tests on JDK 17#1561

Merged
msridhar merged 8 commits intomasterfrom
run-tests-on-jdk17
May 3, 2026
Merged

Enable generic bytecode tests on JDK 17#1561
msridhar merged 8 commits intomasterfrom
run-tests-on-jdk17

Conversation

@msridhar
Copy link
Copy Markdown
Collaborator

@msridhar msridhar commented May 2, 2026

These tests work on JDK 17 with the -XDaddTypeAnnotationsToSymbol=true flag, after the JDK 17.0.19 release, due to backported support. We have to modify our CI config a bit to install the right version of JDK 17 across platforms.

Summary by CodeRabbit

  • Tests

    • Removed Java-version gating from jspecify-related nullness and generics tests so they run unconditionally, ensuring those checks execute in all CI and local runs.
  • Chores

    • CI now installs multiple Java toolchains (including newer and LTS JDKs) and adds a step to list configured toolchains before building and testing.

@msridhar
Copy link
Copy Markdown
Collaborator Author

msridhar commented May 2, 2026

This change is part of the following stack:

Change managed by git-spice.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Removed Java-version conditional skips from multiple jspecify-related tests by deleting Assume.assumeTrue(Runtime.version().feature() >= 21) checks and removing now-unused org.junit.Assume imports. Updated CI build job to configure multiple JDK toolchains (added JDK 27 EA, Zulu 17, Temurin 21 and 25) and added a ./gradlew javaToolchains step before the build. No public APIs or exported declarations were changed.

Possibly related PRs

Suggested reviewers

  • yuxincs
  • seemantasaha
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main purpose of the pull request: enabling generic bytecode tests to run on JDK 17 by removing version gates that previously skipped them.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch run-tests-on-jdk17

Tip

💬 Introducing Slack Agent: Turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@msridhar msridhar enabled auto-merge (squash) May 2, 2026 18:39
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.45%. Comparing base (5c2780c) to head (d9a2727).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1561   +/-   ##
=========================================
  Coverage     88.45%   88.45%           
  Complexity     2878     2878           
=========================================
  Files           103      103           
  Lines          9603     9603           
  Branches       1935     1935           
=========================================
  Hits           8494     8494           
  Misses          532      532           
  Partials        577      577           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@msridhar msridhar requested review from seemantasaha and yuxincs May 2, 2026 19:47
@msridhar msridhar force-pushed the run-tests-on-jdk17 branch from 95e38b5 to 72cee30 Compare May 3, 2026 19:27
@msridhar msridhar force-pushed the run-tests-on-jdk17 branch from 72cee30 to d9a2727 Compare May 3, 2026 19:47
@msridhar msridhar merged commit 05c6ae6 into master May 3, 2026
14 of 22 checks passed
@msridhar msridhar deleted the run-tests-on-jdk17 branch May 3, 2026 20:02
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