-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
Cover a missing case in the spec and implementation.
-
Java API
-
SE
Summary
Specify that Elements.getPackageOf
returns null for a module.
Problem
The Elements.getPackageOf
method was not updated to specify how modules were handled by the method.
Solution
Add the missing case to the specification.
Specification
/**
* Returns the package of an element. The package of a package is
* itself.
+ * The package of a module is {@code null}.
*
* @param type the element being examined
* @return the package of an element
*/
PackageElement getPackageOf(Element type);
- csr of
-
JDK-8216404 Elements.getPackageOf should handle modules
-
- Closed
-