slachiewicz opened a new pull request, #425: URL: https://github.com/apache/maven-shared-utils/pull/425
`Os.getOsFamily()` returns `null` when the current OS matches none of the known families, so `Os.OS_FAMILY` can be null and every caller has to guard for it. Returning an empty string removes that trap. This matches the direction already taken in [#403](https://github.com/apache/maven-shared-utils/pull/403), where `PathTool.getRelativeFilePath` moved from `null` to `""` for the no-answer case. The commit is [Elliotte Rusty Harold](https://github.com/elharo)'s, cherry-picked from the `fix/os-getosfamily-null` branch he pushed here on 2026-07-01 and never opened as a PR. Authorship is preserved, and the code is unchanged. Opening it because the fix is finished and 3.5.0 is close; happy to hand it back if he would rather carry it himself. Note for reviewers: this is a behaviour change on a public constant. A caller testing `Os.OS_FAMILY == null` silently stops matching. In practice the branch is only reachable on an OS none of the families cover, and `Os` is deprecated in 3.5.0 in favour of `org.apache.commons.lang3.SystemUtils`, so the exposure is small -- but it is not zero. Verified: `mvn -B verify` on JDK 17 -> Tests run: 788, Failures: 0, Errors: 0. Spotless clean. *This change was created with AI assistance.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
