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