On Thu, 19 Mar 2026 16:21:47 GMT, Brian Burkhalter <[email protected]> wrote:

>> In the java/io tests, replace the TestNG framework with JUnit.
>
> Brian Burkhalter has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8379824: Manually close the FileReader in teardown

test/jdk/java/io/ByteArrayOutputStream/Write.java line 45:

> 43: 
> 44: public class Write {
> 45:     private static void doBoundsTest(byte[] b, int off, int len,

I know this was from the previous TestNG test, but `doBoundsTest` would be 
greatly simplified if it used `assertThrows` instead.

test/jdk/java/io/ByteArrayOutputStream/Write.java line 132:

> 130:         byte[] b3 = baos.toByteArray();
> 131:         int len3 = len1 + len2 + b.length;
> 132:         if (b3.length != len1 + len2 + b.length) {

(Again, already existed from before), but I noticed that this manual check is 
equivalent to the `assertEquals` below and is redundant and should be removed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30289#discussion_r2961567011
PR Review Comment: https://git.openjdk.org/jdk/pull/30289#discussion_r2961573263

Reply via email to