Repository navigation
Move Linux drivers and path utilities to oshi-common - #3134
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3134 +/- ##
============================================
+ Coverage 61.05% 61.74% +0.68%
Complexity 12 12
============================================
Files 39 39
Lines 2329 2329
Branches 407 407
============================================
+ Hits 1422 1438 +16
+ Misses 789 771 -18
- Partials 118 120 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (61)
💤 Files with no reviewable changes (3)
✅ Files skipped from review due to trivial changes (35)
🚧 Files skipped from review as they are similar to previous changes (22)
📜 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). (4)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: 2026-04-06T04:45:47.644ZApplied to files:
📚 Learning: 2026-03-29T20:01:06.452ZApplied to files:
📚 Learning: 2026-04-05T05:40:45.797ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThis change moves Linux driver and path-constant classes into oshi-common: Changes
Sequence Diagram(s)(omitted — changes are package relocations and import updates without new multi-component control flow) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
Move non-native Linux drivers and path utility classes from oshi-core to oshi-common, enabling reuse by oshi-core-java25 (FFM) without duplicating code. Moved to oshi-common oshi.util.linux (from oshi.util.platform.linux): - ProcPath, DevPath, SysPath Moved to oshi-common oshi.util.driver.linux (from oshi.driver.linux): - Devicetree, Dmidecode, Lshal, Lshw, Sysfs Moved to oshi-common oshi.util.driver.linux.proc (from oshi.driver.linux.proc): - CpuInfo, CpuStat, DiskStats, ProcessStat, UpTime Kept in oshi-core (JNA dependencies): - oshi.driver.linux.Who - oshi.driver.linux.proc.Auxv Updated imports in ~30 files across oshi-core, oshi-core-java25, and oshi-core-java11. Migrated tests to oshi-common with updated packages. Rewrote CpuStatTest to use Runtime.availableProcessors() instead of SystemInfo (oshi-core only).
Move non-native Linux drivers and path utility classes from
oshi-coretooshi-common, enabling reuse by bothoshi-core(JNA) andoshi-core-java25(FFM) without code duplication.Changes
Moved to
oshi.util.linux(fromoshi.util.platform.linux)ProcPath,DevPath,SysPath(/proc,/dev,/sysfilesystem path constants)Moved to
oshi.util.driver.linux(fromoshi.driver.linux)Devicetree,Dmidecode,Lshal,Lshw,Sysfs(pure Java Linux driver utilities)Moved to
oshi.util.driver.linux.proc(fromoshi.driver.linux.proc)CpuInfo,CpuStat,DiskStats,ProcessStat,UpTime(/procfilesystem drivers)Kept in oshi-core (JNA dependencies)
oshi.driver.linux.Who— uses JNAUtmpxTypeoshi.driver.linux.proc.Auxv— usesFileUtilJNA.readNativeLongFromBufferModule metadata
module-info.java: added exports foroshi.util.linux,oshi.util.driver.linux,oshi.util.driver.linux.procmodule-info.java: removed staleexports oshi.util.platform.linuxmodule-info.java: removed staleexports oshi.util.platform.linuxTests
CpuStatTestto useRuntime.getRuntime().availableProcessors()instead ofSystemInfo(oshi-core only)TestConstants.javato oshi-common test treeImport updates
Notes
oshi.util.platform.linux→oshi.util.linuxis required by JPMS (no split packages across modules)oshi.driver.linux→oshi.util.driver.linuxfollows the convention established in the prior PR for Unix driversSummary by CodeRabbit
Refactor
Tests