Repository navigation
OpenBSD: add JNA suffix to oshi-core HAL/OS/etc classes - #3363
Conversation
Matches the naming convention established by AIX (#3350), FreeBSD, and extended to DragonFly today (#3362). The 8 oshi-core OpenBSD classes (5 hardware, 3 software/os) get a JNA suffix to make the JNA-vs-FFM split explicit in the file names. The 6 abstract bases in oshi-common keep their unsuffixed names; the FFM classes in oshi-core-ffm already have the FFM suffix. - Rename: - OpenBsdComputerSystem.java → OpenBsdComputerSystemJNA.java - OpenBsdHardwareAbstractionLayer.java → OpenBsdHardwareAbstractionLayerJNA.java - OpenBsdCentralProcessor.java → OpenBsdCentralProcessorJNA.java - OpenBsdGlobalMemory.java → OpenBsdGlobalMemoryJNA.java - OpenBsdHWDiskStore.java → OpenBsdHWDiskStoreJNA.java - OpenBsdFileSystem.java → OpenBsdFileSystemJNA.java - OpenBsdOperatingSystem.java → OpenBsdOperatingSystemJNA.java - OpenBsdOSProcess.java → OpenBsdOSProcessJNA.java - Three classes (OpenBsdGlobalMemory, OpenBsdFileSystem, OpenBsdOSProcess) previously used `extends oshi.<...>.<unqualified-same-name>` to disambiguate from the common base of the same name. With the suffix in place the FQN-extends becomes a regular `extends OpenBsdFoo` with a normal import — cleaner and matches every other platform. - oshi-core SystemInfo updated for the two renamed entry points. - OpenBsdSysctlUtil stays unsuffixed in oshi-core (matches the BsdSysctlUtil precedent — the FFM counterpart OpenBsdSysctlUtilFFM carries the suffix on the FFM side only). Tested with `./mvnw clean install` from root (all tests pass).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📜 Recent review details⏰ 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). (16)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2026-04-06T04:45:47.644ZApplied to files:
🔇 Additional comments (9)
📝 WalkthroughWalkthroughThis PR systematically renames OpenBSD platform implementation classes to explicitly denote JNA-backed variants. Hardware, OS, file system, and process classes gain a "JNA" suffix; the entry point in SystemInfo is updated to instantiate these new implementations while preserving all public API signatures. ChangesOpenBSD JNA Platform Implementation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 #3363 +/- ##
============================================
+ Coverage 67.82% 75.00% +7.18%
Complexity 76 76
============================================
Files 552 552
Lines 22757 22758 +1
Branches 3759 3759
============================================
+ Hits 15434 17069 +1635
+ Misses 5451 3581 -1870
- Partials 1872 2108 +236
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:
|
Summary
Mechanical naming-consistency cleanup. The 8 OpenBSD classes in
oshi-core(5 hardware, 3 software/os) get aJNAsuffix to match the convention already used for AIX (#3350), FreeBSD, and (as of #3362) DragonFly. The 6 abstract bases inoshi-commonkeep their unsuffixed names; the FFM classes inoshi-core-ffmalready have theFFMsuffix.OpenBSD is the last Unix platform that was inconsistent on this. Solaris is the other holdout but needs architectural work (extracting common bases to
oshi-commonfirst), so it stays a separate task.What changed
oshi-core/.../openbsd/:OpenBsdComputerSystem→OpenBsdComputerSystemJNAOpenBsdHardwareAbstractionLayer→OpenBsdHardwareAbstractionLayerJNAOpenBsdCentralProcessor→OpenBsdCentralProcessorJNAOpenBsdGlobalMemory→OpenBsdGlobalMemoryJNAOpenBsdHWDiskStore→OpenBsdHWDiskStoreJNAOpenBsdFileSystem→OpenBsdFileSystemJNAOpenBsdOperatingSystem→OpenBsdOperatingSystemJNAOpenBsdOSProcess→OpenBsdOSProcessJNAOpenBsdGlobalMemory,OpenBsdFileSystem,OpenBsdOSProcess) previously usedextends oshi.<...>.<unqualified-same-name>to disambiguate from the common base of the same name. With the suffix in place, those become regularextends OpenBsdFoowith a normal import — cleaner and matches every other platform.oshi-core/SystemInfo.javaupdated for the two renamed entry-point classes.OpenBsdSysctlUtilstays unsuffixed inoshi-core(matches theBsdSysctlUtilprecedent — the FFM counterpartOpenBsdSysctlUtilFFMcarries the suffix on the FFM side only).Test plan
./mvnw clean installfrom repo root passes (all tests).oshi-core/SystemInfo(oshi-core-ffm/SystemInfoalready references the FFM versions which kept their existing names).pr.yaml.Summary by CodeRabbit