Repository navigation
Move PerfmonConstants, WindowsPowerSource, and WindowsOSFileStore to oshi-common - #3143
Conversation
|
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 (24)
💤 Files with no reviewable changes (1)
📜 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). (10)
🧰 Additional context used🧠 Learnings (8)📓 Common learnings📚 Learning: 2026-04-08T00:58:07.212ZApplied to files:
📚 Learning: 2026-03-29T20:01:06.452ZApplied to files:
📚 Learning: 2026-04-03T02:07:47.621ZApplied to files:
📚 Learning: 2026-04-06T04:45:51.516ZApplied to files:
📚 Learning: 2026-04-08T00:58:10.736ZApplied to files:
📚 Learning: 2026-03-29T20:03:00.830ZApplied to files:
📚 Learning: 2026-04-06T04:45:47.644ZApplied to files:
🔇 Additional comments (23)
📝 WalkthroughWalkthroughThis PR relocates Windows-specific classes to oshi-common for shared use between JNA and FFM implementations. PerfmonConstants, WindowsPowerSource, and WindowsOSFileStore are moved to common packages. WindowsOSFileStore is refactored to an abstract base class with concrete JNA and FFM subclasses. All consumer imports are updated to reference new locations. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3143 +/- ##
============================================
+ Coverage 61.91% 62.30% +0.38%
Complexity 12 12
============================================
Files 39 39
Lines 2329 2329
Branches 407 407
============================================
+ Hits 1442 1451 +9
+ Misses 777 769 -8
+ Partials 110 109 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sets up the three Windows packages in oshi-common by migrating one class into each:
New packages in oshi-common
oshi.driver.common.windows.perfmon— Windows driver constantsoshi.hardware.common.platform.windows— Windows hardware base classesoshi.software.common.os.windows— Windows software base classesMoved classes
PerfmonConstants →
oshi.driver.common.windows.perfmonpublicfor cross-module accessWindowsPowerSource →
oshi.hardware.common.platform.windowsWindowsPowerSourceJNAandWindowsPowerSourceFFMupdated with new importWindowsOSFileStore →
oshi.software.common.os.windows(extracted superclass)updateFrom()helperWindowsOSFileStoreJNAwithupdateAttributes()callingWindowsFileSystemWindowsOSFileStoreFFMto extend common superclass, fixed constructor parameter order to match JNA, and fixedupdateAttributes()logic to useisLocal()check instead of fallbackWindowsFileSystemupdated to instantiateWindowsOSFileStoreJNAWindowsFileSystemFFMupdated for new constructor signatureBuild fix
!oshi.driver.common.*and!oshi.software.common.*exclusions to bnd Export-Package in oshi-core-java25 to prevent JPMS split-package errors during the shared source tree transition (TODO added for removal)Summary by CodeRabbit
Release Notes