Prefer System.getProperty(..) over System.getenv(..)

MSAL

Replaces System.getenv(..) for USER, USERNAME, HOME, USERPROFILE, TMPDIR, TEMP and TMP with System.getProperty(..) for user.name, user.home or java.io.tmpdir, for better portability.

org.openrewrite.staticanalysis.PreferSystemGetPropertyOverGetenv
mod run . --recipe=org.openrewrite.staticanalysis.PreferSystemGetPropertyOverGetenv

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.