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

Class.getPackage() fails with InternalError if class is defined to the boot class loader but module is not in the boot layer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 11
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b20

      Backports

        Description

        If the VM is started with --limit-modules and the attach API is used to start a JMX agent then the java.management and java.rmi modules will be loaded into a child layer. Calling getPackage on any of the classes in these modules will fail with InternalError as the boot loader implementation of definePackage assumes that if a class is defined to the boot loader in a named module then the named module is in the boot layer.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: