Repository navigation
Enforce the jSpecify annotations: NullAway from WARN to ERROR - #3636
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (12)
📝 WalkthroughWalkthroughThe Error Prone profile now runs NullAway at ChangesNullAway enforcement and documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR enables build failures for nullability violations and updates related documentation; the supplied full-build verification passed, so no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3636 +/- ##
==========================================
Coverage 79.94% 79.94%
- Complexity 3869 4231 +362
==========================================
Files 697 697
Lines 24292 24292
Branches 4012 4012
==========================================
+ Hits 19420 19421 +1
- Misses 2727 2729 +2
+ Partials 2145 2142 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NullAway has run at WARN since #3618 so the backlog it exposed could be drained without blocking the build. That backlog is now zero across oshi-common, oshi-core and oshi-core-ffm, so the check moves to ERROR and a signature that contradicts its annotations fails the build rather than adding to a list. Verified by building the whole reactor under -Perror-prone with the flip in place: zero findings, BUILD SUCCESS. Updates the two pom comments that still described this as groundwork for annotations that had not landed, and the FAQ, which claimed only oshi.hardware and oshi.software.os were marked and that a violation fails CI - the first was out of date and the second was not true while the check ran at WARN. Re-summarizes the CHANGELOG for the whole arc as one entry: what was adopted, then what the sweep fixed, then the user-facing behavior changes as a list. One pull request link per line, for readability of the raw markdown.
02bcc0c to
b18ba24
Compare
The last step of the jSpecify arc. Resolves #3593.
NullAway has run at
WARNsince #3618 so the backlog it exposed could be drained without blockingthe build. That backlog is now zero across
oshi-common,oshi-coreandoshi-core-ffm, so thecheck moves to
ERROR: a signature that contradicts its annotations now fails the build rather thanadding to a list.
Verified by building the whole reactor under
-Perror-pronewith the flip in place — zero findings,BUILD SUCCESS. That is the entire functional change; the other two files are documentation that haddrifted.
The FAQ was describing an earlier state, and in one place an untrue one
oshi.hardwareandoshi.software.oswere@NullMarked. The whole project is markednow, by two different mechanisms for two different audiences: the API packages carry
@NullMarkedin their
package-info.java, which every consumer sees including on a Java 8 or classpath build,while the implementation packages are marked on their module descriptors, which only a module-path
consumer sees — they are internal either way. The native mapping packages under
oshi.jnaandoshi.ffm.platformare explicitly@NullUnmarked, because they mirror C structs and librarieswhere nullability is the operating system's to state and not OSHI's.
WARN— a violation was logged and ignored. This PR is what makes the sentence true, so it nowsays
ERRORseverity explicitly.The two pom comments describing this as "groundwork for jSpecify annotations ... once those land"
have been updated for the same reason.
CHANGELOG
Re-summarized as one entry for the whole arc, in three parts: what was adopted, what the sweep fixed,
and the user-facing behavior changes as a list. One pull request link per line, for readability of the
raw markdown.
Worth a look: the entry introduces a nested list, which this CHANGELOG has not used before. It is the
readable way to present eight distinct behavior changes, but say the word if you would rather have
them inline.
Full gate on macOS:
spotless:apply spotless:check checkstyle:check install forbiddenapis:check javadoc:javadocplus-Perror-prone clean install. All modules green, 1565 tests, 0 failures.Summary by CodeRabbit
Documentation
Chores