On Fri, 27 Feb 2026 11:32:54 GMT, Frederic Thevenet <[email protected]> 
wrote:

>> test/lib/jdk/test/lib/Platform.java line 200:
>> 
>>> 198:                 String l = b.readLine();
>>> 199:                 return (l != null && l.contains("musl"));
>>> 200:             } catch (Exception e) {}
>> 
>> Wouldn't it be better to at least print the exception to make it easier to 
>> diagnose.
>
> I'm glad you raise that point, because I actually feel the same, especially 
> since printing the exception is the first thing I did when I started 
> investigating the problem.
> But, given that this is how the original code was written, I suspected this 
> might have been done on purpose to avoid polluting the program's output, that 
> some tests parse as part of their operation.
> 
> Not sure this is justified; I just opted to minimize the risk of an 
> unfortunate side-effect. But again, I agree better logging would probably 
> have helped catching this way earlier.

The default output stream for is stderr, and will not interfere with stdout 
used for regular output.

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

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

Reply via email to