Download Latest Version Release 7.6.1 source code.zip (3.9 MB) Google Add to Preferred Sources
Home / oshi-parent-7.5.0
Name Modified Size InfoDownloads / Week
Parent folder
oshi-dist-7.5.0.zip 2026-08-17 5.2 MB
README.md 2026-08-17 7.7 kB
Release 7.5.0 source code.tar.gz 2026-08-17 2.8 MB
Release 7.5.0 source code.zip 2026-08-17 3.8 MB
Totals: 4 Items   11.8 MB 0
New Features
  • #3614 - #3636: Adopt JSpecify nullability annotations project-wide and enforce them in continuous integration with NullAway, so every type in a signature is non-null unless it is annotated @Nullable. A method not annotated @Nullable is now a checked guarantee rather than an aspiration, and a null check against one is dead code you can delete. The public API packages and the oshi.util tree carry the marking in their package-info.java, where every consumer sees it, including on a Java 8 or classpath build; the implementation packages are marked on their module descriptors; the native mapping packages under oshi.jna and oshi.ffm.platform opt out, because nullability there is the operating system's to state rather than OSHI's. The org.jspecify:jspecify dependency is optional and compile-time only, so it does not reach your runtime classpath. See the FAQ for what this does and does not promise - @dbwiddis.
  • #3615: Add ParseUtil.getStringValueOrEmpty, which normalizes a nullable string to "", alongside the existing getStringValueOrUnknown - @dbwiddis.
  • #3641: Add HardwareAbstractionLayer.getVirtualization(), which identifies the hypervisor, container runtime or cloud platform hosting the system, promoting the long-standing DetectVM demo into the library. It returns an Optional<String> naming the platform, or an empty Optional when no signature matched - which means undetermined, not confirmed bare metal. Detection reads the processor's CPUID vendor string, the computer system's manufacturer and model, and network interface MAC address OUIs, in that order. The signature tables ship as the oshi.vm.properties and oshi.vmmacaddr.properties resources; placing a file of either name earlier on the classpath replaces that table, so you can teach OSHI about a platform it does not know - @dbwiddis.
  • #3646, #3647: Add NetworkParams.getRoutes(), which returns the operating system's routing table as a list of IPRoute objects covering both address families - @dbwiddis.
Behavior Changes
  • #3646: NetworkParams.getIpv6DefaultGateway() on OpenBSD returns the IPv6 gateway. It previously omitted the -inet6 flag and returned the IPv4 gateway. NetworkParams default gateways on AIX return an empty string when no default route is configured, matching the documented contract. They previously returned Constants.UNKNOWN.
  • #3614 - #3636: Stating each nullability contract explicitly during the JSpecify sweep surfaced implementations that did not honor it. Values that were documented as unreadable but returned null now return the sentinel the rest of the API uses. The following user-facing behavior changed:
  • DisplayInfo's preferred resolution, model and product serial number return an empty string rather than null for a synthesized display such as the Apple Silicon built-in panel.
  • SoundCard.getDriverVersion() and getCodec() return Constants.UNKNOWN rather than null when the platform reports neither, and Linux reports an unreadable ALSA driver version as Constants.UNKNOWN rather than the string not available.
  • UsbDevice.getVendor() and getUniqueDeviceId() return an empty string rather than null on Windows.
  • ComputerSystem, Baseboard and Firmware fields return Constants.UNKNOWN rather than null on AIX, Windows and the BSDs.
  • An installed application's name, version and vendor return an empty string rather than null on every platform.
  • NetworkParams.getDomainName() returns an empty string rather than null on FreeBSD.
  • A macOS process whose passwd or group entry cannot be read reports its numeric user and group id through the FFM implementation, matching JNA.
  • #3616: Report a disk's model or serial number, and a macOS partition's UUID, as Constants.UNKNOWN when it reads as an empty string, matching every other unreadable value. Affects AIX disks whose lscfg serial field is blank, and the Linux device-mapper and macOS equivalents. Partition filesystem UUIDs and labels are unchanged.
  • #3641: NetworkIF.isKnownVmMacAddr() recognizes five more prefixes, so it now returns true for a VMware interface using the 00:1C:14 allocation and for Amazon Web Services and Google Cloud Platform instances. oshi.demo.DetectVM.identifyVM() is deprecated in favor of HardwareAbstractionLayer.getVirtualization(), and now returns curated product names rather than whichever raw signature happened to match.
Bug Fixes and Improvements
  • #3589: Ship oshi-dist as a single .zip, excluding oshi-demo and its jfreechart and jackson dependencies, and attach it to each GitHub release. Test-javadoc jars and oshi-benchmark are no longer published - @dbwiddis.
  • #3611, #3612: Log exceptions with their stack trace and cause chain rather than substituting getMessage() into the log text, and attach the underlying failure as the cause of the InstantiationException from AbstractNetworkIF and the UnsatisfiedLinkError from ForeignFunctions.dlopenWithFlags. Two Windows logs that had been losing their argument now report it - @dbwiddis.
  • #3614 - #3636: Harden reads of incomplete platform output, found while stating the nullability contracts above. An empty line in a /proc statistics file, an AIX logical volume missing its type or partition count, a BSD ps line missing its process state, and a Solaris system with no SMBIOS section of a given type no longer throw. Windows CPU ticks are no longer reported as all zero when an optional processor utility counter is unavailable - @dbwiddis.
  • #3639: Fix a race in the Windows GPU utilization calculation, which tested its cached previous tick sample for null and then dereferenced it in a second read, so a concurrent poll could throw a NullPointerException. That sample and the cached ADL adapter index are now volatile, as a @ThreadSafe class requires - @dbwiddis.
  • #3643: Harden getSessions() against a corrupt utmpx entry on Linux, macOS, FreeBSD and Solaris. A single unreadable record now skips that one session instead of abandoning the native read and re-querying everything through the who command. The utmpx table is not reentrant, so a session ending while OSHI iterates it can legitimately yield a partially written entry; the who fallback now applies only when the native read returns nothing at all - @dbwiddis.

Full change log

Source: README.md, updated 2026-08-17