On Fri, 13 Feb 2026 17:49:29 GMT, Brian Burkhalter <[email protected]> wrote:

>> Null checks potentially mask a more serious, fundamental problem and should 
>> be removed to allow a `NullPointerException` to be throw if the variable is 
>> `null`.
>
> Brian Burkhalter has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8377910: In class OpenClose make arrays local to run method and other 
> instance variables final

test/jdk/java/io/FileDescriptor/Sharing.java line 370:

> 368:                  for(int i=0;i<numFiles;i++) {
> 369:                      fisArray[i].close();
> 370:                      fosArray[i].close();

It might be clearer if you change fisArray and fosArray to be local to the run 
method. There is no reason for them to be fields in OpenClose. Making fd and 
done final would help too. 

I can't see from the bug report what failed but hopefully better output with 
the changes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29718#discussion_r2805363903

Reply via email to