On Wed, 24 Sep 2025 18:36:53 GMT, Roger Riggs <[email protected]> wrote:

>> David Beaumont has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Manually deleting ImageReaderFactory (it returned somehow)
>
> src/java.base/share/classes/jdk/internal/jimage/ModuleReference.java line 86:
> 
>> 84:         return new ModuleReference(moduleName, FLAGS_HAS_CONTENT | 
>> previewFlag(isPreview));
>> 85:     }
>> 86: 
> 
> Using "of" as the prefix for the method name instead of "for" would align 
> better with many other APIs.

Hmm, I've always used "ofXxx" only when the `Xxx` is part of the given input.

In this case the term "resource" isn't referring to the input, but the type of 
thing the reference is used for (something with content). In that situation 
`ofResource(<none-of-the-parameters-reference-a-resource>)` feels weird to me.

Maybe `forResourceIn(<module-name>, <flag>)` makes it clearer a resource is not 
being passed into the method.
Thoughts?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1619#discussion_r2414858138

Reply via email to