RFR: 8191441: (Process) add Readers and Writer access to java.lang.Process streams

Naoto Sato naoto at openjdk.java.net
Thu May 20 21:05:28 UTC 2021


On Thu, 20 May 2021 20:46:36 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> test/jdk/java/lang/ProcessBuilder/ReaderWriterTest.java line 64:
>> 
>>> 62:         return new Object[][] {
>>> 63:                 {"UTF-8"},
>>> 64:                 {"ISO8859-1"},
>> 
>> `ISO8859-1` may not be available on all underlying OSes.
>
> Is there a safe subset?
> I haven't seen a failure yet, if/when it occurs, we make an exception or narrow the test to known systems.

Lucky you :-)
I wasn't so lucky that I got an intermittent issue (https://bugs.openjdk.java.net/browse/JDK-8265918), where it only fails if the test is run on an Ubuntu CI test machine. It's not only depending on Linux distros, but on the user's configuration (minimal install or full, etc.), so I don't think there is any safe subset.
That said, the test code uses those encoding names as `sun.stdout/err.encoding` properties values, not setting the real native encoding, so the test should be fine. Only the argument name in the test (`nativeEncoding`) is a bit confusing.

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

PR: https://git.openjdk.java.net/jdk/pull/4134


More information about the core-libs-dev mailing list