-
Notifications
You must be signed in to change notification settings - Fork 329
Test on JDK 25 #1301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test on JDK 25 #1301
Conversation
WalkthroughExpands tested JDK range to include 25 across build scripts and CI, bumps WALA and Mockito versions, removes a disabled testJdk24 guard in JarInfer build, and replaces FileOfClasses with PatternsFilter for exclusions in JarInfer's analysis driver. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer (PR)
participant GH as GitHub Actions
participant Gradle as Gradle
participant Tests as Test tasks
Note over Dev,GH: PR updates JDK targets, toolchains, deps, and JarInfer code
Dev->>GH: push changes
GH->>Gradle: checkout + setup JDKs (includes 25)
Gradle->>Gradle: generate test tasks for each JDK (17..25)
Gradle->>Tests: run test tasks (testJdk25 included)
alt Previously disabled JarInfer JDK task
Gradle->>Tests: now allows JarInfer JDK task to run (no onlyIf { false })
end
Gradle->>Gradle: apply bumped dependency versions (WALA, Mockito)
Tests-->>GH: report results
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
jdk-recent-unit-tests/build.gradle (1)
25-25: Minor: modernize the toolchain setter and sync commentsUse parentheses for readability and update nearby comment (Line 21) to “Use JDK 25”.
-java.toolchain.languageVersion.set JavaLanguageVersion.of(25) +java.toolchain.languageVersion.set(JavaLanguageVersion.of(25))jar-infer/jar-infer-lib/src/main/java/com/uber/nullaway/jarinfer/DefinitelyDerefedParamsDriver.java (1)
243-245: Add trailing newline to DEFAULT_EXCLUSIONS when building PatternsFilterSome pattern parsers require a trailing newline for the final pattern — append "\n" before getting bytes.
- scope.setExclusions( - new PatternsFilter( - new ByteArrayInputStream(DEFAULT_EXCLUSIONS.getBytes(StandardCharsets.UTF_8)))); + scope.setExclusions( + new PatternsFilter( + new ByteArrayInputStream((DEFAULT_EXCLUSIONS + "\n").getBytes(StandardCharsets.UTF_8))));No FileOfClasses occurrences found; only this setExclusions call in jar-infer/jar-infer-lib/src/main/java/com/uber/nullaway/jarinfer/DefinitelyDerefedParamsDriver.java.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
buildSrc/src/main/groovy/nullaway.java-test-conventions.gradle(1 hunks)gradle/dependencies.gradle(2 hunks)jar-infer/jar-infer-lib/build.gradle(0 hunks)jar-infer/jar-infer-lib/src/main/java/com/uber/nullaway/jarinfer/DefinitelyDerefedParamsDriver.java(2 hunks)jdk-recent-unit-tests/build.gradle(2 hunks)
💤 Files with no reviewable changes (1)
- jar-infer/jar-infer-lib/build.gradle
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: msridhar
PR: uber/NullAway#1245
File: guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java:101-102
Timestamp: 2025-08-14T18:50:06.159Z
Learning: In NullAway JSpecify tests, when JDK version requirements exist due to bytecode annotation reading capabilities, prefer failing tests over skipping them on unsupported versions to ensure CI catches regressions and enforces proper JDK version usage for developers.
📚 Learning: 2025-08-14T18:50:06.159Z
Learnt from: msridhar
PR: uber/NullAway#1245
File: guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java:101-102
Timestamp: 2025-08-14T18:50:06.159Z
Learning: In NullAway JSpecify tests, when JDK version requirements exist due to bytecode annotation reading capabilities, prefer failing tests over skipping them on unsupported versions to ensure CI catches regressions and enforces proper JDK version usage for developers.
Applied to files:
buildSrc/src/main/groovy/nullaway.java-test-conventions.gradlejdk-recent-unit-tests/build.gradle
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Build spring-framework with snapshot
- GitHub Check: Build and test on windows-latest
- GitHub Check: Build and test on macos-latest
- GitHub Check: Build caffeine with snapshot
🔇 Additional comments (4)
buildSrc/src/main/groovy/nullaway.java-test-conventions.gradle (1)
68-92: Expanding the matrix to JDK 25 looks goodChanges align with the PR goal and EP gating remains intact.
jar-infer/jar-infer-lib/src/main/java/com/uber/nullaway/jarinfer/DefinitelyDerefedParamsDriver.java (1)
50-50: Migration to WALA PatternsFilter is correctImport/update matches WALA API changes; constructor with an InputStream is the right choice.
Also applies to: 243-245
gradle/dependencies.gradle (1)
57-57: Verify JDK 25 compatibility for WALA 1.6.12 and Mockito 5.19.0
WALA 1.6.12 — no explicit JDK‑25 support found in release notes (support recorded up to JDK‑23). Action: run CI/tests on JDK 25 or search WALA issues/PRs for JDK‑25 work. (gradle/dependencies.gradle:57)
Mockito 5.19.0 — release notes call out JDK‑21 only; runtime on JDK‑25 depends on Byte Buddy. Action: confirm resolved net.bytebuddy version >= 1.17.5 (or apply the net.bytebuddy.experimental workaround), upgrade if needed, then run CI/tests on JDK 25. (gradle/dependencies.gradle:129)
jdk-recent-unit-tests/build.gradle (1)
56-62: Incorrect — disabling only testJdk17/testJdk25 is sufficient; there are no testJdk18–24 tasks.buildSrc/src/main/groovy/nullaway.java-test-conventions.gradle registers testJdk tasks only for [17, 25], so the getByName disables in jdk-recent-unit-tests/build.gradle (lines ~56–62) correctly target the only testJdk tasks; no change required.
Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/continuous-integration.yml (1)
24-31: Optional: add check-latest to reduce “25 not found” flakiness right after GA.This ensures setup-java downloads the latest Temurin 25 even if it isn’t pre-cached on a given runner image yet. (github.com)
with: java-version: | 25 21 distribution: 'temurin' + check-latest: true
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/continuous-integration.yml(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: msridhar
PR: uber/NullAway#1245
File: guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java:101-102
Timestamp: 2025-08-14T18:50:06.159Z
Learning: In NullAway JSpecify tests, when JDK version requirements exist due to bytecode annotation reading capabilities, prefer failing tests over skipping them on unsupported versions to ensure CI catches regressions and enforces proper JDK version usage for developers.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Build spring-framework with snapshot
- GitHub Check: Build caffeine with snapshot
- GitHub Check: Build and test on ubuntu-latest
🔇 Additional comments (1)
.github/workflows/continuous-integration.yml (1)
27-31: LGTM — JDK 25 added; Gradle toolchains reference JDK 25. CI installs both JDK 25 and 21; repository contains toolchain usages referencing 25 (jdk-recent-unit-tests/build.gradle: java.toolchain.languageVersion.set JavaLanguageVersion.of(25); buildSrc/src/main/groovy/nullaway.java-test-conventions.gradle: registers testJdk25).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1301 +/- ##
=========================================
Coverage 88.49% 88.49%
Complexity 2476 2476
=========================================
Files 93 93
Lines 8214 8214
Branches 1617 1617
=========================================
Hits 7269 7269
Misses 474 474
Partials 471 471 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
We update to the latest WALA release, which supports running on JDK 25, so we can re-enable JarInfer tests. Note that running JarInfer now does not work on Temurin, since they exclude
.jmodfiles from their distribution (see the WALA docs). So we switch our CI JDKs to be from the Zulu distribution.According to the CI job proposal from #1271, we should also be switching to building on JDK 25, with a separate test job for JDK 21. I will hold off on that for a bit (to check stability) and then do it in a separate PR, along with an upgrade to Gradle 9.1.0 which supports running on JDK 25.
Fixes #1189
Summary by CodeRabbit
New Features
Tests
Chores
Build/CI