RFR: 8378702: jdk.test.lib.Platform.isMusl() may return false negative on Alpine Linux

David Holmes dholmes at openjdk.org
Thu Feb 26 22:30:53 UTC 2026


On Thu, 26 Feb 2026 08:14:39 GMT, Frederic Thevenet <fthevenet at openjdk.org> wrote:

>> test/lib/jdk/test/lib/Platform.java line 196:
>> 
>>> 194:             ProcessBuilder pb = new ProcessBuilder(lddPath.get(), "--version");
>>> 195:             pb.redirectErrorStream(true);
>>> 196:             try (Process p = pb.start()) {
>> 
>> `Process` is not `AutoCloseable` - why are you using try-with-resources?
>
> `Process` implements `Closable` since https://bugs.openjdk.org/browse/JDK-8364361
> 
> Although on second thought, I agree it is worth considering whether or not we want to do this here, as it will make backporting this change less straight forward.

TIL ... okay but TBH it looks weird to me to use it this way.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29923#discussion_r2861590301


More information about the core-libs-dev mailing list