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

Nestmate package validation logging/exception should include classloader information

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b22

      Description

      One of the rules for nestmates is that the nest-host and all nest members must be in the same runtime package: that means same package name and same classloader.

      If the host and member are loaded by different classloaders you will get a report that they are in different packages:

      java.lang.IncompatibleClassChangeError: Type compiler.codecache.stress.Helper$TestCaseImpl is not a nest member of compiler.codecache.stress.Helper: types are in different packages

      but the fact they were loaded by different classloaders is far from clear. This change will make it clear:

      java.lang.IncompatibleClassChangeError: Type compiler.codecache.stress.Helper$TestCaseImpl (loader: jdk.test.lib.ByteCodeLoader @450fdc47) is not a nest member of compiler.codecache.stress.Helper (loader: 'app'): types are in different packages

        Attachments

          Activity

            People

            Assignee:
            dholmes David Holmes
            Reporter:
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: