Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8216429

Elements.getPackageOf should handle modules

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Cover a missing case in the spec and implementation.
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      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);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                darcy Joe Darcy
                Reviewed By:
                Jan Lahoda
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: