Currently _isWsl()_ function is looking for "Microsoft" string in the _kernel release_ string (`$ uname -r`). That's not always true. Namely, on Ubuntu 22.04 - currently the newest Ubuntu LTS and default OS for WSL in Microsoft Store. In there `$ uname -r` command outputs "5.10.102.1-microsoft-standard-WSL2". This makes _isWsl()_ function to return `false` in such environments and breaks JDK builds on WSL.
To correct that I made the substring search case-insensitive. ------------- Commit messages: - 8306281: function isWsl() returns false on WSL2 Changes: https://git.openjdk.org/jdk/pull/14413/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14413&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8306281 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/14413.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14413/head:pull/14413 PR: https://git.openjdk.org/jdk/pull/14413
