Repository navigation
Fix remaining Error Prone javadoc-shape findings, suppress MissingSummary, escalate cleared checks to ERROR - #3606
Conversation
Closes out every WARNING-severity finding except MissingSummary
(explicitly deprioritized, see next commit): EscapedEntity (HTML
entities inside {@code}/{@literal} render literally, so use the bare
characters instead), NotJavadoc (four oshi-demo main() methods had a
stale duplicate /** block left over from an older doc pass, sandwiched
around @SuppressForbidden), AlmostJavadoc (three private helper
methods had genuine @return-bearing doc comments opened with /* rather
than /**), InvalidInlineTag (a stray "@PARAM patterns}" instead of
"{@code patterns}"), and InlineFormatString (a single-use format
string constant, inlined into its one call site).
MissingSummary demands a summary fragment distinct from the @return block; Checkstyle's javadoc checks don't require that phrasing, and the project doesn't want a separate Error Prone rule for it either. Separately, every other WARNING-severity check with findings across the #3594-3605 triage and the previous commit is now at zero. Escalate each of them individually to ERROR so a regression fails the build, using the same javac mechanism that already blocks on Error Prone's own ERROR-severity checks - narrower than -Werror, which would also fail on every other javac warning category this project has never triaged.
|
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)
📜 Recent review details⏰ Context from checks skipped due to timeout. (4)
🧰 Additional context used📓 Path-based instructions (4)**/*.{java,properties}📄 CodeRabbit inference engine (AGENTS.md)
Files:
oshi-common/**/*.java📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*Test.java📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.java📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (2)📓 Common learnings📚 Learning: 2026-08-03T00:46:14.953ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThe PR strengthens selected Error Prone checks in Maven and cleans up Javadocs, comments, and test helper code across OSHI modules. Runtime behavior and public declarations remain unchanged. ChangesError Prone enforcement and documentation cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to This PR makes localized documentation and Error Prone configuration cleanup changes, with the reported validation checks passing; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3606 +/- ##
============================================
- Coverage 79.87% 79.84% -0.03%
- Complexity 3868 3991 +123
============================================
Files 710 710
Lines 24243 24242 -1
Branches 4057 4057
============================================
- Hits 19363 19355 -8
- Misses 2714 2720 +6
- Partials 2166 2167 +1
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:
|
Missed in the prior commit: I'd only verified 'mvn compile', which skips test sources. The escalation to ERROR surfaced these on CI. Inline both single-use message-template constants, same fix as FreeBsdSensorsJNA's InlineFormatString earlier in this PR.
-Xlint:all findings (raw type, missing-explicit-ctor), both from a one-off diagnostic sweep, not a build-enforced check: - FileStorePanel: suppress rawtypes alongside the existing unchecked suppression on the same generic-array-creation idiom. - SystemInfoTest (FFM): add an explicit package-private constructor so the exported oshi.ffm package doesn't expose a default public one. Also widen oshi-core-ffm's org.slf4j requirement to transitive: ForeignFunctions' public callInArena*OrDefault methods take a Logger parameter directly, unlike other modules where Logger is only a private field, so this one actually needs it. Sonar findings from the latest master analysis: - S108: comment the intentionally-empty default arm in LogicalProcessorInformationFFM, matching the JNA twin's existing "Ignore Group info" comment. - S1905: drop the genuinely-redundant int-to-long cast in KstatUtilFFM (the JNA twin already omits it). The three long-to- double casts Sonar also flagged in FileStorePanel/MemoryPanel are NOT redundant - they're required by Error Prone's LongDoubleConversion check (ERROR severity as of #3606), which exists specifically to catch long-to-double precision loss. Suppressed those three with NOSONAR instead of removing them. Left alone: S9149 (22 findings) - MSFTStorageFFM/JNA and similar classes redeclare identical static methods from their oshi-common base class purely so each backend module can reference a locally- named class. Real callers exist for all of them; fixing this means deleting ~9 shim class-pairs and repointing callers at the shared base classes directly across both twins - a separate, larger PR.
Summary
Closes out the Error Prone WARNING backlog left after #3594-3605:
{@code}/{@literal}render literally in Javadoc output; use the bare</>/&characters instead.oshi-demomain()methods carried a stale duplicate/**block left behind from an older doc pass, sandwiched around@SuppressForbidden. Removed the stale block, keeping (and where useful, merging in) the more accurate one.@return-bearing doc comments opened with/*instead of/**.@param patterns}that should have been{@code patterns}.Then, since the whole backlog is at zero:
@returnblock, which Checkstyle's javadoc checks don't require and the project doesn't want to enforce separately.ERRORseverity, so a regression fails the build via the same javac mechanism already blocking on Error Prone's built-in ERROR-severity checks - narrower than-Werror, which would also fail on javac warning categories (deprecation, unchecked, etc.) nothing here has ever triaged.Test plan
./mvnw clean compile -Perror-prone: 0 warnings, 0 errors, across all 8 modules./mvnw clean spotless:apply sortpom:sort checkstyle:check install forbiddenapis:check javadoc:javadoc: BUILD SUCCESSSummary by CodeRabbit
Documentation
Chores