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

Nestmate package validation logging/exception should include classloader information

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 12
    • hotspot
    • b22

      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

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

              Created:
              Updated:
              Resolved: