Skip to content

Merge oshi-core-java11 into oshi-core; add module descriptor and redirection pom - #3181

Merged
dbwiddis merged 1 commit into
oshi:masterfrom
dbwiddis:merge-java11-into-core
Apr 21, 2026
Merged

dbwiddis merged 1 commit into
oshi:masterfrom
dbwiddis:merge-java11-into-core

Conversation

@dbwiddis

@dbwiddis dbwiddis commented Apr 21, 2026 •

Copy link
Copy Markdown
Member

This PR eliminates the separate oshi-core-java11 artifact by adding a module-info.java directly to oshi-core (compiled at release 9, all other classes at release 8).

Changes

  • Add module-info.java and module-info.test to oshi-core, using the same dual-compilation approach as oshi-common
  • Switch oshi-core from jna/jna-platform to jna-jpms/jna-platform-jpms dependencies to avoid automatic module warnings
  • Add bnd Export-Package override in oshi-core to prevent split-package issues with oshi-common
  • Add bnd override in oshi-common to remove unused jLibreHardwareMonitor import warning
  • Remove -split-package:=merge-first from parent bnd config (no longer needed)
  • Replace Automatic-Module-Name manifest entry with proper module descriptor
  • Move tests to non-conflicting packages to avoid JPMS split-package errors:
    • oshi.hardware → oshi.hardware.platform.shared
    • oshi.software.os → oshi.software.os.shared
    • oshi.util.FstatUtilTest → oshi.util.platform.unix.openbsd
    • oshi.util.ProcstatUtilTest → oshi.util.platform.unix.freebsd
  • Delete oshi-core-java11 source; recreate as a redirection pom to oshi-core
  • Update oshi-dist assembly and dependencies
  • Update README, site index, CHANGELOG, and Upgrading guide

Summary by CodeRabbit

  • Breaking Changes

    • oshi-core-java11 consolidated into oshi-core; redirection POM added for compatibility.
  • New Features

    • oshi-core ships with a JPMS module name (com.github.oshi) and OSGi bundle metadata.
  • Documentation

    • README, upgrade guide and site updated to reflect merged modules, JPMS guidance, and updated API links.
  • Tests

    • Test packages reorganized into more specific platform/shared namespaces.

@coderabbitai

coderabbitai Bot commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 06971e32-75ba-421c-a977-b2d6ef9db167

📥 Commits

Reviewing files that changed from the base of the PR and between 0b3bd03 and a9512a9.

📒 Files selected for processing (36)
  • CHANGELOG.md
  • README.md
  • oshi-common/pom.xml
  • oshi-core-ffm/pom.xml
  • oshi-core-java11/pom.xml
  • oshi-core-java11/src/site/site.xml
  • oshi-core-java25/pom.xml
  • oshi-core/pom.xml
  • oshi-core/src/main/java/module-info.java
  • oshi-core/src/test/java/module-info.test
  • oshi-core/src/test/java/oshi/hardware/platform/shared/CentralProcessorTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisplayTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GraphicsCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PowerSourceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PrinterTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/ApplicationInfoTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/FileSystemTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/InternetProtocolStatsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/OperatingSystemTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/freebsd/ProcstatUtilTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/openbsd/FstatUtilTest.java
  • oshi-dist/pom.xml
  • oshi-dist/src/assembly/assembly.xml
  • pom.xml
  • src/site/markdown/Upgrading.md
  • src/site/markdown/index.md
💤 Files with no reviewable changes (3)
  • oshi-core-java11/src/site/site.xml
  • oshi-dist/pom.xml
  • oshi-dist/src/assembly/assembly.xml
✅ Files skipped from review due to trivial changes (11)
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisplayTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PowerSourceTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/FileSystemTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/OperatingSystemTest.java
  • oshi-core-ffm/pom.xml
  • oshi-common/pom.xml
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (17)
  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PrinterTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/CentralProcessorTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GraphicsCardTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/InternetProtocolStatsTest.java
  • oshi-core/src/main/java/module-info.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/openbsd/FstatUtilTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/ApplicationInfoTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/freebsd/ProcstatUtilTest.java
  • oshi-core/src/test/java/module-info.test
  • oshi-core-java11/pom.xml
  • pom.xml
📜 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). (1)
  • GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3014
File: oshi-core-java11/src/main/java/module-info.java:10-17
Timestamp: 2026-03-29T20:01:06.452Z
Learning: In the oshi project, `oshi-core-java25/src/main/java/module-info.java` intentionally does NOT export `oshi.util.platform.unix.freebsd`, `oshi.util.platform.unix.openbsd`, or `oshi.util.platform.unix.solaris`, because the FFM (Foreign Function & Memory) implementation only supports Windows, macOS, and Linux. This differs from `oshi-core-java11/src/main/java/module-info.java` which exports all Unix platform packages. The asymmetry is by design.
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3121
File: oshi-core/src/main/java/oshi/software/os/linux/LinuxOperatingSystem.java:53-53
Timestamp: 2026-04-06T04:45:51.516Z
Learning: In the oshi/oshi project, the public API is strictly limited to interfaces and classes in the `oshi`, `oshi.hardware`, and `oshi.software.os` packages. All platform-specific code under subpackages like `oshi.software.os.linux`, `oshi.hardware.platform.linux`, etc., is considered implementation detail — not public API. Do not flag changes to platform-specific classes (e.g., making `LinuxOperatingSystem` abstract, narrowing constructor visibility, adding abstract methods) as public API breaks.
📚 Learning: 2026-03-29T20:01:06.452Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3014
File: oshi-core-java11/src/main/java/module-info.java:10-17
Timestamp: 2026-03-29T20:01:06.452Z
Learning: In the oshi project, `oshi-core-java25/src/main/java/module-info.java` intentionally does NOT export `oshi.util.platform.unix.freebsd`, `oshi.util.platform.unix.openbsd`, or `oshi.util.platform.unix.solaris`, because the FFM (Foreign Function & Memory) implementation only supports Windows, macOS, and Linux. This differs from `oshi-core-java11/src/main/java/module-info.java` which exports all Unix platform packages. The asymmetry is by design.

Applied to files:

  • oshi-core-java25/pom.xml
  • oshi-core/pom.xml
  • README.md
  • src/site/markdown/Upgrading.md
  • src/site/markdown/index.md
📚 Learning: 2026-04-06T04:45:51.516Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3121
File: oshi-core/src/main/java/oshi/software/os/linux/LinuxOperatingSystem.java:53-53
Timestamp: 2026-04-06T04:45:51.516Z
Learning: In the oshi/oshi project, the public API is strictly limited to interfaces and classes in the `oshi`, `oshi.hardware`, and `oshi.software.os` packages. All platform-specific code under subpackages like `oshi.software.os.linux`, `oshi.hardware.platform.linux`, etc., is considered implementation detail — not public API. Do not flag changes to platform-specific classes (e.g., making `LinuxOperatingSystem` abstract, narrowing constructor visibility, adding abstract methods) as public API breaks.

Applied to files:

  • README.md
  • src/site/markdown/Upgrading.md
  • src/site/markdown/index.md
📚 Learning: 2026-04-08T17:30:11.929Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3127
File: CHANGELOG.md:3-3
Timestamp: 2026-04-08T17:30:11.929Z
Learning: In the oshi/oshi repository's `CHANGELOG.md`, the standard layout uses `#` (h1) for release version headers and `#####` (h5) for subsection headers such as "New Features" and "Bug fixes / Improvements". This intentional heading level skip is the project's established convention and should not be flagged as a markdownlint MD001 violation.

Applied to files:

  • src/site/markdown/Upgrading.md
  • src/site/markdown/index.md
🪛 LanguageTool
README.md

[uncategorized] ~14-~14: The official name of this software platform is spelled with a capital “H”.
Context: ...ess/jna). Supports JDK 8+. JPMS module: com.github.oshi. - FFM (oshi-core-ffm): Use...

(GITHUB)

src/site/markdown/Upgrading.md

[uncategorized] ~33-~33: The official name of this software platform is spelled with a capital “H”.
Context: ... declared an Automatic-Module-Name of com.github.oshi in its manifest but had no module...

(GITHUB)

src/site/markdown/index.md

[uncategorized] ~14-~14: The official name of this software platform is spelled with a capital “H”.
Context: ...ess/jna). Supports JDK 8+. JPMS module: com.github.oshi. - FFM (oshi-core-ffm): Use...

(GITHUB)

🔇 Additional comments (8)
oshi-core-java25/pom.xml (1)

17-24: Relocation block looks good.

Mirrors the oshi-core-java11 → oshi-core redirect pattern cleanly, and the coordinates align with the oshi-core-ffm dependency declared below and the guidance in src/site/markdown/Upgrading.md.

oshi-core/pom.xml (3)

94-126: Dual-release compile configuration looks correct.

default-compile excludes module-info.java (compiled at the parent's Java 8 release), and the second execution compiles only module-info.java at --release 9. Execution order within the compile phase is preserved, so target/classes is populated before the module descriptor is validated against it. This matches the oshi-common approach called out in the PR description.

One thing worth double-checking on CI: with --release 9 on module-info.java, bytecode for the descriptor will be class file v53. Some older toolchains that read manifests but not module descriptors are fine, but any consumer bytecode scanners pinned to v52 max may complain — shouldn't affect runtime on Java 8 since it ignores module-info.class.


22-45: JPMS-aware JNA swap is consistent.

Both dependencyManagement and the direct dependencies move to jna-jpms / jna-platform-jpms, which provide a real module-info (com.sun.jna, com.sun.jna.platform) matching the requires transitive clauses in oshi-core/src/main/java/module-info.java. The jLibreHardwareMonitor exclusions still reference the non-jpms jna / jna-platform coordinates — that's the correct form because Maven matches exclusions by the artifact coordinates declared by the transitive dependency, not by what you're substituting in here.


140-145: Export-Package patterns are correctly configured for the current package structure.

The verification found no Java source files directly under oshi.driver or oshi.util.platform, so the wildcard patterns oshi.driver.* and oshi.util.platform.* capture all the relevant classes in those package trees. There are no classes silently excluded from the bundle. Both packages are parent directories for platform-specific implementations, and the patterns work as designed.

Note: Classes do exist directly in oshi.jna (ByRef.java, Struct.java), but this package is internal implementation and not part of the public API (which is strictly limited to oshi, oshi.hardware, and oshi.software.os), so the OSGi export configuration for it doesn't affect the public contract.

src/site/markdown/index.md (2)

14-14: LGTM on the JNA description tweak.

Listing the JPMS module name inline is helpful for users configuring module-info.java. The LanguageTool "GitHub" capitalization hint is a false positive — "JNA" isn't GitHub-branded text.


36-44: Stable list intentionally retains oshi-core-java11, snapshot drops it — good.

Stable 6.12.0 still ships the separate JPMS artifact, so keeping that row is accurate. Removing the JPMS entry from the 7.0.0-SNAPSHOT list reflects the merge into oshi-core. Matches the Upgrading guide.

README.md (1)

14-44: Docs stay in sync with src/site/markdown/index.md.

Same JNA/JPMS line, same API link retarget, same stable-vs-snapshot treatment of oshi-core-java11. Nothing to add.

src/site/markdown/Upgrading.md (1)

17-48: Upgrade section is clear and actionable.

The Java 9/Java 8 split is explained, the redirect POM is called out, and the useModulePath=false Surefire escape hatch is a nice touch for users who depended on classpath reflection into non-exported internals. Section header ## JPMS Module Name Change (FFM) on line 50 now scopes the pre-existing FFM rename section correctly, avoiding confusion with the new oshi-core module descriptor.


📝 Walkthrough

Walkthrough

Consolidates oshi-core-java11 into oshi-core (redirect POM), adds bnd/OSGi manifest generation, switches to JPMS-aware JNA artifacts and module-info adjustments, reorganizes many test packages, removes oshi-core-java11 from distribution, and updates documentation and changelog to reflect these changes.

Changes

Cohort / File(s) Summary
Module Consolidation & Redirect
oshi-core-java11/pom.xml, oshi-core-java11/src/site/site.xml
Converted oshi-core-java11 to a deprecated redirect POM (packaging → pom), added distribution relocation to oshi-core, removed module site descriptor and previous build/Javadoc/JNA configs.
OSGi / bnd Build Config
oshi-common/pom.xml, pom.xml, oshi-core/pom.xml
Added/updated biz.aQute.bnd:bnd-maven-plugin configuration to emit OSGi headers (Export-Package, Import-Package, Bundle-SymbolicName) and adjusted root bnd export settings.
JPMS & Compilation Changes
oshi-core/pom.xml, oshi-core/src/main/java/module-info.java
Switched JNA deps to jna-jpms/jna-platform-jpms; changed compile strategy to produce Java 8 classes plus a Java 9 module-info.class; added opens oshi.jna.common to com.sun.jna;.
Test JVM Options
oshi-core/src/test/java/module-info.test
Updated --add-opens test JVM directives to match new package layout (replaced/added opens for shared and unix platform packages).
Test File Reorganization
oshi-core/src/test/java/oshi/hardware/platform/shared/*, oshi-core/src/test/java/oshi/software/os/shared/*, oshi-core/src/test/java/oshi/util/platform/unix/*
Moved many tests into platform-specific *.platform.shared or *.platform.unix.* packages and added explicit imports; updated copyrights in some tests.
Distribution / Assembly
oshi-dist/pom.xml, oshi-dist/src/assembly/assembly.xml
Removed com.github.oshi:oshi-core-java11 from oshi-dist dependencies and assembly includes.
Documentation & Site
CHANGELOG.md, README.md, src/site/markdown/Upgrading.md, src/site/markdown/index.md
Added breaking-change entry about merging oshi-core-java11 into oshi-core, updated README/site JNA JPMS module name to com.github.oshi, switched API/Javadoc links to oshi-core, and added upgrading guidance and redirection POM notes.
FFM & Javadoc tweaks
oshi-core-ffm/pom.xml, oshi-core-java25/pom.xml
Enabled inclusion of dependency sources for Javadoc (restricted to oshi-common); added relocation for oshi-core-java25 → oshi-core-ffm.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • rohan-coder02

"A tiny POM flipped, a module sings,
JNA finds its JPMS wings,
Tests marched into tidy rows,
OSGi banners gently rose—
One core united, onward it springs!" 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main changes: merging oshi-core-java11 into oshi-core and adding a module descriptor with redirection POM support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Apr 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.31%. Comparing base (4e41a09) to head (a9512a9).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3181      +/-   ##
==========================================
- Coverage   57.34%   57.31%   -0.03%     
==========================================
  Files         424      424              
  Lines       20346    20346              
  Branches     3577     3577              
==========================================
- Hits        11667    11661       -6     
- Misses       6911     6921      +10     
+ Partials     1768     1764       -4     
Flag Coverage Δ
linux 22.71% <ø> (+0.01%) ⬆️
macos 25.83% <ø> (-0.01%) ⬇️
windows 34.78% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
oshi-core/pom.xml (1)

131-131: Use -nosubstitution: true to disable package substitution globally.

The concern about clause-scoped directives is valid—only oshi.util.platform.* currently has -noimport:=true, leaving the other exported packages substitutable. However, rather than adding -noimport:=true to each clause individually (which is error-prone), the bnd best practice is to use the global -nosubstitution: true instruction. This achieves the same effect more reliably and is the recommended approach for library bundles.

Add -nosubstitution: true to the bnd configuration (e.g., before or after the Export-Package line) instead of manually applying the directive to each clause.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@oshi-core/pom.xml` at line 131, Replace the per-clause directive approach for
package substitution by adding the global bnd instruction -nosubstitution: true
to the bnd configuration so Export-Package (and other package clauses) are not
subject to substitution; locate the Export-Package clause shown (the CDATA
containing "Export-Package: oshi.jna.*,...oshi.util.platform.*;-noimport:=true")
and insert the global -nosubstitution: true instruction in the same bnd section
(before or after the Export-Package entry) instead of relying on clause-scoped
-noimport:=true markers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@oshi-core-java11/pom.xml`:
- Around line 12-23: The current POM publishes oshi-core-java11 as a POM-only
artifact but lacks Maven relocation, so consumers trying to resolve the jar will
fail; update the POM to add a <distributionManagement><relocation> entry that
relocates the old coordinates (artifactId oshi-core-java11, groupId
${project.groupId}, version ${project.version}) to the new target artifact
(artifactId oshi-core, same groupId and version), include a clear relocation
message indicating the module is deprecated and now provided by oshi-core, and
ensure the relocation block is placed under <distributionManagement> so Maven
clients are redirected transparently.

---

Nitpick comments:
In `@oshi-core/pom.xml`:
- Line 131: Replace the per-clause directive approach for package substitution
by adding the global bnd instruction -nosubstitution: true to the bnd
configuration so Export-Package (and other package clauses) are not subject to
substitution; locate the Export-Package clause shown (the CDATA containing
"Export-Package: oshi.jna.*,...oshi.util.platform.*;-noimport:=true") and insert
the global -nosubstitution: true instruction in the same bnd section (before or
after the Export-Package entry) instead of relying on clause-scoped
-noimport:=true markers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aa745845-c9de-4d76-b50e-12aa45d5d7bc

📥 Commits

Reviewing files that changed from the base of the PR and between 4e41a09 and 0b3bd03.

📒 Files selected for processing (34)
  • CHANGELOG.md
  • README.md
  • oshi-common/pom.xml
  • oshi-core-java11/pom.xml
  • oshi-core-java11/src/site/site.xml
  • oshi-core/pom.xml
  • oshi-core/src/main/java/module-info.java
  • oshi-core/src/test/java/module-info.test
  • oshi-core/src/test/java/oshi/hardware/platform/shared/CentralProcessorTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisplayTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GraphicsCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PowerSourceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PrinterTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/ApplicationInfoTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/FileSystemTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/InternetProtocolStatsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/OperatingSystemTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/freebsd/ProcstatUtilTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/openbsd/FstatUtilTest.java
  • oshi-dist/pom.xml
  • oshi-dist/src/assembly/assembly.xml
  • pom.xml
  • src/site/markdown/Upgrading.md
  • src/site/markdown/index.md
💤 Files with no reviewable changes (3)
  • oshi-core-java11/src/site/site.xml
  • oshi-dist/pom.xml
  • oshi-dist/src/assembly/assembly.xml
📜 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). (12)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Test JDK 25, ubuntu-latest (+ JNA==FFM)
  • GitHub Check: Analyze (java)
  • GitHub Check: Test JDK 25, windows-latest (+ JNA==FFM)
  • GitHub Check: Test JDK 21, ubuntu-latest
  • GitHub Check: Test JDK 11, ubuntu-latest
  • GitHub Check: Test JDK 11, macos-latest
  • GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
  • GitHub Check: Test JDK 21, windows-latest
  • GitHub Check: Test JDK 21, macos-latest
  • GitHub Check: Test JDK 11, windows-latest
  • GitHub Check: Lint (Spotless, Checkstyle, ForbiddenAPIs, Javadoc)
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3014
File: oshi-core-java11/src/main/java/module-info.java:10-17
Timestamp: 2026-03-29T20:01:06.452Z
Learning: In the oshi project, `oshi-core-java25/src/main/java/module-info.java` intentionally does NOT export `oshi.util.platform.unix.freebsd`, `oshi.util.platform.unix.openbsd`, or `oshi.util.platform.unix.solaris`, because the FFM (Foreign Function & Memory) implementation only supports Windows, macOS, and Linux. This differs from `oshi-core-java11/src/main/java/module-info.java` which exports all Unix platform packages. The asymmetry is by design.
📚 Learning: 2026-04-06T04:45:51.516Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3121
File: oshi-core/src/main/java/oshi/software/os/linux/LinuxOperatingSystem.java:53-53
Timestamp: 2026-04-06T04:45:51.516Z
Learning: In the oshi/oshi project, the public API is strictly limited to interfaces and classes in the `oshi`, `oshi.hardware`, and `oshi.software.os` packages. All platform-specific code under subpackages like `oshi.software.os.linux`, `oshi.hardware.platform.linux`, etc., is considered implementation detail — not public API. Do not flag changes to platform-specific classes (e.g., making `LinuxOperatingSystem` abstract, narrowing constructor visibility, adding abstract methods) as public API breaks.

Applied to files:

  • oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PrinterTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PowerSourceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/CentralProcessorTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GraphicsCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/FileSystemTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/openbsd/FstatUtilTest.java
  • oshi-core/src/main/java/module-info.java
  • oshi-core/src/test/java/oshi/software/os/shared/InternetProtocolStatsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/ApplicationInfoTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisplayTest.java
  • README.md
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java
  • src/site/markdown/index.md
  • pom.xml
  • CHANGELOG.md
  • oshi-core/src/test/java/oshi/software/os/shared/OperatingSystemTest.java
  • oshi-core/src/test/java/module-info.test
  • oshi-common/pom.xml
  • oshi-core-java11/pom.xml
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
  • src/site/markdown/Upgrading.md
📚 Learning: 2026-03-29T20:01:06.452Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3014
File: oshi-core-java11/src/main/java/module-info.java:10-17
Timestamp: 2026-03-29T20:01:06.452Z
Learning: In the oshi project, `oshi-core-java25/src/main/java/module-info.java` intentionally does NOT export `oshi.util.platform.unix.freebsd`, `oshi.util.platform.unix.openbsd`, or `oshi.util.platform.unix.solaris`, because the FFM (Foreign Function & Memory) implementation only supports Windows, macOS, and Linux. This differs from `oshi-core-java11/src/main/java/module-info.java` which exports all Unix platform packages. The asymmetry is by design.

Applied to files:

  • oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PrinterTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PowerSourceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/CentralProcessorTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GraphicsCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/FileSystemTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/openbsd/FstatUtilTest.java
  • oshi-core/src/main/java/module-info.java
  • oshi-core/src/test/java/oshi/software/os/shared/InternetProtocolStatsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/ApplicationInfoTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisplayTest.java
  • README.md
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java
  • src/site/markdown/index.md
  • pom.xml
  • oshi-core/src/test/java/oshi/util/platform/unix/freebsd/ProcstatUtilTest.java
  • CHANGELOG.md
  • oshi-core/src/test/java/oshi/software/os/shared/OperatingSystemTest.java
  • oshi-core/src/test/java/module-info.test
  • oshi-common/pom.xml
  • oshi-core-java11/pom.xml
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
  • src/site/markdown/Upgrading.md
  • oshi-core/pom.xml
📚 Learning: 2026-04-03T18:43:51.290Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3112
File: oshi-core/src/main/java/oshi/PlatformEnum.java:99-100
Timestamp: 2026-04-03T18:43:51.290Z
Learning: In oshi/oshi PlatformEnum.java, the DragonFly BSD detection uses `osName.equalsIgnoreCase("dragonflybsd")` intentionally, mirroring the exact same check in JNA's `Platform.java` source. Java's `os.name` property on DragonFly BSD is "dragonflybsd" (no space), so `startsWith("DragonFly")` is NOT the correct pattern here. Do not suggest changing it to `startsWith`.

Applied to files:

  • oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/openbsd/FstatUtilTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/OperatingSystemTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
📚 Learning: 2026-04-15T04:56:18.352Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3163
File: oshi-core-java25/src/test/java/oshi/ffm/mac/CoreFoundationTest.java:97-103
Timestamp: 2026-04-15T04:56:18.352Z
Learning: In CoreFoundationTest.java (oshi-core-java25/src/test/java/oshi/ffm/mac/CoreFoundationTest.java), asserting exact CFGetRetainCount deltas (+1 after retain, -1 after release) is intentional and considered reliable for freshly created CF objects (e.g., CFStringRef via CFStringRef.createCFString) where the test holds sole ownership. Do not flag these assertions as flaky — the Apple "avoid CFGetRetainCount" advisory applies to shared/framework-managed objects, not exclusively owned objects in unit tests.

Applied to files:

  • oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/ApplicationInfoTest.java
📚 Learning: 2026-04-18T03:18:03.725Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3170
File: oshi-benchmark/src/test/java/oshi/comparison/PerfmonComparisonTest.java:177-183
Timestamp: 2026-04-18T03:18:03.725Z
Learning: In `oshi-benchmark/src/test/java/oshi/comparison/PerfmonComparisonTest.java`, GPU engine PDH instance counts (from `GpuInformationJNA.queryGpuEngineCounters()` / `GpuInformationFFM.queryGpuEngineCounters()`) are highly volatile — counts can differ dramatically (e.g., 53 vs 40) even between queries taken milliseconds apart. Do not assert instance count equality or exact instance list matching between JNA and FFM results. The only reliable assertion is that both are empty or both are non-empty (`assertThat(ffm.getA().isEmpty()).isEqualTo(jna.getA().isEmpty())`).

Applied to files:

  • oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PrinterTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PowerSourceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/CentralProcessorTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GraphicsCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/FileSystemTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/InternetProtocolStatsTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/ApplicationInfoTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisplayTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/freebsd/ProcstatUtilTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
📚 Learning: 2026-04-19T01:28:43.529Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3174
File: oshi-benchmark/src/test/java/oshi/comparison/WmiComparisonTest.java:237-257
Timestamp: 2026-04-19T01:28:43.529Z
Learning: In `oshi-benchmark/src/test/java/oshi/comparison/WmiComparisonTest.java`, the WMI comparison tests (e.g., `testProcessor`) intentionally validate only index 0 and a few representative fields per WMI data type (String, uint16, uint32, uint64). Exhaustive row-by-row comparison is deliberately avoided for numerically heavy multi-row tables. The design rationale is: matching row counts + a few selected fields covering each data type is sufficient to verify JNA vs FFM driver parity. Do not suggest looping over all rows for these tests.

Applied to files:

  • oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java
📚 Learning: 2026-04-11T05:51:52.684Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3139
File: oshi-core-java25/src/main/java/oshi/hardware/platform/linux/LinuxGpuStatsFFM.java:36-58
Timestamp: 2026-04-11T05:51:52.684Z
Learning: In OSHI's `LinuxGpuStats` (oshi-common/src/main/java/oshi/hardware/common/platform/linux/LinuxGpuStats.java), the abstract `nvml*` methods (nvmlGetVramUsed, nvmlGetCoreClockMhz, nvmlGetMemoryClockMhz, nvmlGetTemperature, nvmlGetPowerDraw, nvmlGetFanSpeedPercent) are contractually expected to return `-1` (long or double) on failure. The base class applies `if (val >= 0)` guards before using any NVML result and falls through to sysfs/hwmon paths when negative. Subclasses (LinuxGpuStatsJNA, LinuxGpuStatsFFM) correctly pass through the -1 sentinel unchanged — do not flag this as a missing clamp or contract violation.

Applied to files:

  • oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisplayTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java
📚 Learning: 2026-04-08T00:58:10.736Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3125
File: oshi-core-java25/src/main/java/oshi/hardware/platform/windows/WindowsPowerSourceFFM.java:131-133
Timestamp: 2026-04-08T00:58:10.736Z
Learning: In `oshi-core/src/main/java/oshi/hardware/platform/windows/WindowsPowerSourceJNA.java` and `oshi-core-java25/src/main/java/oshi/hardware/platform/windows/WindowsPowerSourceFFM.java`, the `getPowerSources()` method intentionally returns a singleton list wrapping a single `getPowerSource("System Battery")` call, and the enumeration loop short-circuits after the first eligible battery pack. This matches the longstanding JNA behavior and is not a bug. A broader refactor to support zero-or-more batteries across both implementations is planned for a later date. Do not flag this as an issue.

Applied to files:

  • oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PowerSourceTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
📚 Learning: 2026-04-06T22:30:07.083Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3122
File: oshi-core/src/main/java/oshi/hardware/platform/mac/MacUsbDeviceJNA.java:215-234
Timestamp: 2026-04-06T22:30:07.083Z
Learning: In `oshi-core/src/main/java/oshi/hardware/platform/mac/MacUsbDeviceJNA.java`, the `found` flag in `getControllerIdByLocation` is intentionally set to `true` as soon as either `vendor-id` or `device-id` is found in a matching service's parent. This is a deliberate design choice: a partial match (one of the two IDs) is preferred over continuing to iterate, because iterating further risks pairing IDs from two different and potentially mismatched services. Do not flag this as a bug or suggest splitting into separate `foundVendor`/`foundProduct` flags.

Applied to files:

  • oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/CentralProcessorTest.java
📚 Learning: 2026-04-05T15:37:17.867Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3117
File: oshi-core-java25/src/main/java/oshi/hardware/platform/linux/LinuxUsbDeviceFFM.java:59-65
Timestamp: 2026-04-05T15:37:17.867Z
Learning: In OSHI's Linux USB device implementations (LinuxUsbDeviceFFM, and the JNA equivalent), when `getUsbDevices(boolean tree)` is called with `tree=false`, the returned flat list intentionally **includes** controller nodes — it does not exclude them. The existing Javadoc that says "returns a flat list excluding controllers" is incorrect. Do not flag the implementation for including controllers in flat mode; instead, flag only the Javadoc if it claims controllers are excluded.

Applied to files:

  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
📚 Learning: 2026-04-06T21:48:11.921Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3122
File: oshi-core/src/main/java/oshi/hardware/platform/mac/MacUsbDeviceJNA.java:85-111
Timestamp: 2026-04-06T21:48:11.921Z
Learning: In `oshi-core/src/main/java/oshi/hardware/platform/mac/MacUsbDeviceJNA.java` (and `MacUsbDeviceFFM.java`), the `id = 0L` sentinel is intentional when `device.getParentEntry(IOSERVICE)` returns null. It acts as a catch-all controller group for devices whose controller cannot be identified (an edge case that "should never happen" given the IORegistry format). Do not flag this as a bug or suggest skipping such devices; the design intentionally avoids both silently dropping orphaned devices and placing them at the top level without a controller context.

Applied to files:

  • oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java
📚 Learning: 2026-04-14T23:28:18.252Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3160
File: oshi-common/src/test/java/oshi/hardware/common/platform/linux/LinuxSensorsTest.java:34-40
Timestamp: 2026-04-14T23:28:18.252Z
Learning: In oshi/oshi, `vcgencmd` (used in `LinuxSensors.queryCpuTemperatureFromVcGenCmd()` and related methods) is a Raspberry Pi-specific binary. It will never be present on standard x86/amd64 CI runners or developer machines. Tests that pass `isPi=true` to `LinuxSensors` and assert 0/empty returns are deterministic in practice; do not flag them as potentially flaky due to `vcgencmd` availability.

Applied to files:

  • oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java
📚 Learning: 2026-04-03T18:44:48.200Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3112
File: oshi-core/src/main/java/oshi/PlatformEnum.java:63-66
Timestamp: 2026-04-03T18:44:48.200Z
Learning: In oshi/oshi PlatformEnum.java, the DRAGONFLYBSD enum constant is intentionally added for platform detection only (no implementation classes exist yet). It allows UnsupportedOperationException messages to say "DragonFly BSD" rather than "Unknown". Full DragonFly BSD support is tracked in issue `#2583`. Do not flag the missing switch-case implementations as a bug.

Applied to files:

  • oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/PrinterTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/openbsd/FstatUtilTest.java
  • oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java
  • oshi-core/src/test/java/oshi/util/platform/unix/freebsd/ProcstatUtilTest.java
  • oshi-core/src/test/java/oshi/software/os/shared/OperatingSystemTest.java
  • oshi-core/src/test/java/module-info.test
  • oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java
📚 Learning: 2026-04-08T17:30:11.929Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3127
File: CHANGELOG.md:3-3
Timestamp: 2026-04-08T17:30:11.929Z
Learning: In the oshi/oshi repository's `CHANGELOG.md`, the standard layout uses `#` (h1) for release version headers and `#####` (h5) for subsection headers such as "New Features" and "Bug fixes / Improvements". This intentional heading level skip is the project's established convention and should not be flagged as a markdownlint MD001 violation.

Applied to files:

  • README.md
  • src/site/markdown/index.md
  • CHANGELOG.md
  • src/site/markdown/Upgrading.md
🪛 LanguageTool
README.md

[uncategorized] ~14-~14: The official name of this software platform is spelled with a capital “H”.
Context: ...ess/jna). Supports JDK 8+. JPMS module: com.github.oshi. - FFM (oshi-core-ffm): Use...

(GITHUB)

src/site/markdown/index.md

[uncategorized] ~14-~14: The official name of this software platform is spelled with a capital “H”.
Context: ...ess/jna). Supports JDK 8+. JPMS module: com.github.oshi. - FFM (oshi-core-ffm): Use...

(GITHUB)

src/site/markdown/Upgrading.md

[uncategorized] ~33-~33: The official name of this software platform is spelled with a capital “H”.
Context: ... declared an Automatic-Module-Name of com.github.oshi in its manifest but had no module...

(GITHUB)

🔇 Additional comments (24)
oshi-core/src/test/java/oshi/util/platform/unix/freebsd/ProcstatUtilTest.java (1)

5-17: LGTM — clean relocation to the FreeBSD util package.

Now in the same package as ProcstatUtil, so no import needed there, and oshi.util.PlatformEnum (non-deprecated) is used correctly. Aligns with the JPMS split-package avoidance goal of this PR.

oshi-core/src/test/java/oshi/software/os/shared/ApplicationInfoTest.java (1)

5-23: LGTM.

Package move to oshi.software.os.shared with the explicit ApplicationInfo import is consistent with the other relocated OS tests in this PR.

oshi-core/src/test/java/oshi/software/os/shared/NetworkParamsTest.java (1)

5-14: LGTM.

Package relocation and the added NetworkParams import are correct.

oshi-core/src/test/java/oshi/software/os/shared/FileSystemTest.java (1)

5-17: LGTM.

Relocation plus the explicit FileSystem / OSFileStore imports correctly decouple the test from its previous in-package access.

oshi-core/src/test/java/oshi/software/os/shared/InternetProtocolStatsTest.java (1)

5-26: LGTM.

Top-level InternetProtocolStats import added alongside the existing nested-type imports — matches the new package location.

oshi-core/src/test/java/oshi/software/os/shared/OperatingSystemTest.java (1)

5-51: LGTM — imports updated cleanly for the package move.

All the now-required production types (OperatingSystem, OSProcess, OSService, OSSession, OSThread, OSDesktopWindow) are imported, and the existing nested-type imports (OSVersionInfo, ProcessFiltering, ProcessSorting) remain correctly anchored to OperatingSystem.

oshi-core/src/test/java/oshi/hardware/platform/shared/GlobalMemoryTest.java (1)

5-25: LGTM.

Move to oshi.hardware.platform.shared with the GlobalMemory / PhysicalMemory imports is consistent with the other hardware test relocations.

oshi-core/src/test/java/oshi/hardware/platform/shared/SoundCardTest.java (1)

5-14: LGTM.

Package relocation and SoundCard import are correct.

oshi-core/src/test/java/oshi/hardware/platform/shared/UsbDeviceTest.java (1)

5-5: Package relocation looks good.

The new shared test package matches the file path, and the explicit UsbDevice import keeps the test referencing the production API cleanly after the move.

Also applies to: 18-18

oshi-core/src/test/java/oshi/hardware/platform/shared/PrinterTest.java (1)

5-5: Package move is consistent.

The test now lives under the shared platform test namespace and imports Printer explicitly, which is the right adjustment after leaving the original package.

Also applies to: 14-14

oshi-core/src/test/java/oshi/hardware/platform/shared/NetworksTest.java (1)

5-5: Shared test namespace update looks correct.

The package declaration and explicit NetworkIF import align with the JPMS split-package cleanup without changing the test behavior.

Also applies to: 18-18

oshi-core/src/test/java/oshi/hardware/platform/shared/PowerSourceTest.java (1)

5-5: Package/import relocation is clean.

The test package now matches the shared test path, and the explicit PowerSource import preserves the original API reference.

Also applies to: 19-19

oshi-core/src/test/java/oshi/hardware/platform/shared/SensorsTest.java (1)

5-5: Relocation is aligned with the shared test package.

The Sensors import is the expected follow-up to moving this test out of oshi.hardware.

Also applies to: 19-19

CHANGELOG.md (1)

8-8: Changelog entry is clear.

This captures both the oshi-core-java11 merge into oshi-core and the migration path via the redirection POM.

oshi-core/src/test/java/oshi/hardware/platform/shared/VirtualMemoryTest.java (1)

5-5: Virtual memory test relocation is covered.

The package matches the shared test namespace, and the added imports make the API dependencies explicit after the package move.

Also applies to: 17-19

oshi-core/src/main/java/module-info.java (1)

16-16: Opening oshi.jna.common is the right JPMS adjustment.

oshi.jna.common contains JNA Structure bindings, so granting com.sun.jna reflective access matches the existing module descriptor pattern.

oshi-core/src/test/java/oshi/hardware/platform/shared/DisksTest.java (1)

2-2: Package move and imports look consistent.

The new test package matches the directory layout, and the explicit hardware imports keep the moved test resolving the same public API types.

Also applies to: 5-5, 20-21

oshi-core/src/test/java/oshi/hardware/platform/shared/GraphicsCardTest.java (1)

5-5: Package/import update aligns with the JPMS test layout.

This matches the oshi.hardware.platform.shared test package opened in oshi-core/src/test/java/module-info.test, and the added imports are the expected public hardware API types.

Also applies to: 15-16

oshi-core/src/test/java/oshi/util/platform/unix/openbsd/FstatUtilTest.java (1)

5-5: OpenBSD test relocation looks good.

The package now matches the OpenBSD-specific path, and the added PlatformEnum import preserves the existing platform guard while allowing same-package access to FstatUtil.

Also applies to: 17-17

oshi-core/src/test/java/oshi/hardware/platform/shared/CentralProcessorTest.java (1)

5-5: Central processor test move is clean.

The package relocation is consistent with the shared hardware test layout, and the explicit CentralProcessor import correctly replaces the previous same-package resolution.

Also applies to: 25-25

src/site/markdown/index.md (1)

14-14: Docs match the oshi-core JPMS consolidation.

The module name, API link, and download labels are consistent with moving the JPMS descriptor into oshi-core; keeping com.github.oshi lowercase is correct for the module identifier.

Also applies to: 26-26, 37-37, 43-43

oshi-core/src/test/java/oshi/hardware/platform/shared/GpuStatsTest.java (1)

5-5: GPU stats test imports are correct after the package move.

The moved test now explicitly imports the public GPU API types it uses, with no change to the lifecycle/sentinel assertions.

Also applies to: 24-26

oshi-core/src/test/java/oshi/hardware/platform/shared/ComputerSystemTest.java (1)

2-2: Computer system test relocation looks consistent.

The package path and added imports line up with the shared hardware test namespace, while keeping the assertions on the same public API types.

Also applies to: 5-5, 18-20

oshi-core/src/test/java/oshi/hardware/platform/shared/DisplayTest.java (1)

2-2: Display test move is straightforward.

The new package matches the shared hardware test location, and the explicit Display import preserves the same API reference.

Also applies to: 5-5, 16-16

Comment thread oshi-core-java11/pom.xml Resolved
@dbwiddis
dbwiddis force-pushed the merge-java11-into-core branch from 0b3bd03 to a9512a9 Compare April 21, 2026 08:21
@dbwiddis
dbwiddis merged commit 93da646 into oshi:master Apr 21, 2026
16 of 17 checks passed
@dbwiddis
dbwiddis deleted the merge-java11-into-core branch April 21, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant