Review quest for bug 8022879: sun/nio/cs/ fails intermittently

Martin Buchholz martinrb at
Fri Aug 16 14:19:45 UTC 2013

This test remains clearly buggy, at least in theory - the user could have a
default charset named UTFred that does not handle unicode.  I think the
test also depends on the replacement.

The test could be made more robust and also get more coverage by iterating
over all available charsets, (or unconditionally using e.g. US-ASCII)

It's possible to check for encodability using

It's possible to get the replacement byte array using

On Fri, Aug 16, 2013 at 1:37 AM, Eric Wang < at> wrote:

> Hi,
> Please help to review the fix below for bug**
> browse/JDK-8022879 <>
> The test has defect as it wouldn't be executed if the file.encoding is
> UTF-8 (lots of test machines in nightly are UTF-8), it also doesn't check
> UTF-16 and UTF-32 which can cause test fail too.
> The fix is to check whether the default charset is unicode, if yes, use
> US-ASCII to test instead.
> Thanks,
> Eric

More information about the core-libs-dev mailing list