On Thu, 18 Jun 2026 02:34:45 GMT, Jaikiran Pai <[email protected]> wrote:
>> test/jdk/sun/nio/cs/TestStringCodingUTF8.java line 115: >> >>> 113: //getBytes(csn); >>> 114: byte[] baStr = str.getBytes(cs.name()); >>> 115: if (!Arrays.equals(ba, baStr)) >> >> Maybe we could use `Arrays.mismatch()`, and prints the actual difference in >> the exception. > > Hello Naoto, I had considered that, but I then noticed that these tests use > extremely large arrays in many cases. For example, `1000`, `0x10000`, > `0x20000` `0x30000` etc... So although Arrays.mismatch might give the first > mismatching index, printing the actual difference might be very large and may > overflow the jtreg log message limit. > > But let me give a bit more thought today. I think we just need to display the code unit at the returned index, and a few code units before and after the index. That should be enough to determine what went wrong ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31548#discussion_r3432993001
