← All tasks
javaoshi/oshi #3371Not a task: already works

Instantiating SystemInfo in OSGi environment with 7.3.x

envgap__oshi__oshi-3371

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
68bf11ae9c789efb38812fca49868266de188f1e
Manifest
oshi-core/pom.xml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

oshi/oshi #3371 · read the original issue
Hi,
We try to update our oshi dependency from 6.11.1 to latest 7.3.0.

The way of obtaining SystemInfo via the preferred way of using SystemInfoFactory via ServiceProvider does not work (or at least is complicated) in an OSGi-environment.
As doc states, this should still be possible using ``SystemInfoProvider si = new oshi.SystemInfo();``, and would technically work, however, the oshi-core artifact declares: ``Private-Package: oshi``, so it is not exported and thus not available.

``SystemInfoProvider si = new oshi.nativefree.SystemInfo();`` would work, as ``oshi.nativefree`` is an exported package, but this then only works on Linux.

Is there another way of OS-independently obtaining a SystemInfo(Provider) object, or should the ``oshi`` package actually be exported?
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]