The JVMS states in section 4.7.26 that:
The ModulePackages attribute indicates all the packages of a module that are exported or opened by the Module attribute, as well as all the packages of the service implementations recorded in the Module attribute. The ModulePackages attribute may also indicate packages in the module that are neither exported nor opened nor contain service implementations.
When would it be meaningful to add such a package when it is not exported or opened? I cannot see that the Java compiler is ever adding packages this way.
I stumbled over this since ASM also offers a ModuleVisitor::visitPackage
method.