-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
The API specification has been updated to match the current implementation of that method. No compatibility impact is expected due to this change.
-
Java API
-
SE
Summary
The specification of java.lang.module.ModuleDescriptor.packages()
method is updated
to clarify that it returns a set of all packages that belong to the module.
Problem
The current specification of ModuleDescriptor.packages()
states:
/**
* Returns the set of packages in the module.
*
* <p> The set of packages includes all exported and open packages, as well
* as the packages of any service providers, and the package for the main
* class. </p>
It's not clear from that text that the implementation of this method returns all packages that belong to the module irrespective of the accessibility of those packages.
Solution
The text is updated to match the current implementation of that method.
Specification
/**
* Returns the set of all packages in the module.
*
* @return A possibly-empty unmodifiable set of the packages in the module
*/
public Set<String> packages() {
- csr of
-
JDK-8365898 Specification of java.lang.module.ModuleDescriptor.packages() method can be improved
-
- Resolved
-