RFR: 8368333: [lworld] Add preview mode to ImageReader and JRT file-system [v3]
Roger Riggs
rriggs at openjdk.org
Tue Oct 21 20:04:21 UTC 2025
On Wed, 8 Oct 2025 19:55:07 GMT, David Beaumont <duke at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/jimage/ModuleReference.java line 122:
>>
>>> 120: public boolean hasContent() {
>>> 121: return ((flags & FLAGS_HAS_CONTENT) != 0);
>>> 122: }
>>
>> isEmpty could avoid introducing "content" as a loosely defined term.
>> It would be more similar to directories being empty or lists being empty.
>
> I've bounced between this several times. The thing is that a non-empty package directory will not have content if it only contains other directories, and seeing logic talking about a package being "empty" when it has child directories is weird/confusing. I've actually thought about this naming quite hard and I think it's more misleading to use the term "empty". However, since it's obviously still not clear enough maybe a different name altogether?
>
> How about "hasResources()" or "hasResourceContent()" ?
Where is the presumed hierarchy of package non-emptyness used?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1619#discussion_r2417230590
More information about the valhalla-dev
mailing list