On Thu, 16 Jul 2026 15:46:47 GMT, Chen Liang <[email protected]> wrote:

>> Can I please get a review of this change which reorders a null check in 
>> `ExplodedImage`? While at it, the `isClosable` is made `final` in 
>> `JrtFileSystem` too.
>> 
>> 
>> 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/java.base/share/classes/jdk/internal/jrtfs/ExplodedImage.java line 125:
> 
>> 123:             super(name, link.getFileAttributes());
>> 124:             this.file = null;
>> 125:             this.link = Objects.requireNonNull(link);
> 
> Look at the other constructors: Notice they have `requireNonNull` as an 
> intention for what kind of node is constructed and the different state 
> contracts of different kinds of nodes.

I don't follow what you mean. The change proposed in this PR continues to have 
the explicit `requireNonNull` check for `link` parameter.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2649#discussion_r3596947103

Reply via email to