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/Reader/ReadIntoZeroLengthArray.java line 77:

> 75:                          new PushbackReader(fileReader),
> 76:                          fileReader,
> 77:                          new StringReader(new String(new byte[] 
> {(byte)42})));

I assume this test would be simpler if it didn't attempt to re-use the 
fileReader. That is, use `new LineNumberReader(new FileReader(..))`, new 
PushbackReader(new FileReader(..), ... here.  test0 and test1 could be changed 
to use try-with-resources and that would allow autoCloseArguments=false to be 
removed.

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

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

Reply via email to