RFR: 8365898: Specification of java.lang.module.ModuleDescriptor.packages() method can be improved [v3]
Alan Bateman
alanb at openjdk.org
Tue Aug 26 08:22:36 UTC 2025
On Tue, 26 Aug 2025 05:54:27 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> and it does indeed return all the packages. If not the JVMS text, perhaps the API specification of `java.lang.classfile.attribute.ModulePackagesAttribute.packages()` method can be simplified to say that it returns all packages? Perhaps as a separate issue?
I think better to separate that discussion. Just some context: the ModulePackage class file attribute is an optional attribute that is added by tools at packaging time (not compile time). It's an optimization to avoid needing to scan the module contents to get its set of packages. For the class file API, ModulePackagesAttribute::packages will just return the list of package entries that correspond to the packages in the attribute.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26928#issuecomment-3223119677
More information about the core-libs-dev
mailing list