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

Module::getPackages on an unnamed module may return packages that are in a named module

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
      None

      Description

      If Module::getPackages is invoked on the unnamed module of a class loader then the set of packages returned will include the packages of any named modules that are defined to that class loader.

      Fixing this will require a small spec change because Module::getPackages is specified to return the same of packages as ClassLoader::getDefinePackages. It should only return the packages that are in the unnamed module.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mchung Mandy Chung
              Reporter:
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: