Rename @CompileWithTargetClassAccess

Rename `@CompileWithTargetClassAccess` to
`@CompileWithForkedClassLoaderClassLoader`.

Closes gh-29173
This commit is contained in:
Phillip Webb
2022-09-19 09:37:36 -07:00
parent 7168141504
commit cc7552ec61
12 changed files with 37 additions and 36 deletions

View File

@@ -206,7 +206,7 @@ class TestCompilerTests {
}
@Test
@CompileWithTargetClassAccess
@CompileWithForkedClassLoader
void compiledCodeCanAccessExistingPackagePrivateClassIfAnnotated() throws LinkageError {
SourceFiles sourceFiles = SourceFiles.of(SourceFile.of("""
package com.example;
@@ -240,7 +240,7 @@ class TestCompilerTests {
assertThatExceptionOfType(IllegalAccessError.class)
.isThrownBy(() -> TestCompiler.forSystem().compile(sourceFiles,
compiled -> compiled.getInstance(PublicInterface.class, "com.example.Test").perform()))
.withMessageContaining(ClassUtils.getShortName(CompileWithTargetClassAccess.class));
.withMessageContaining(ClassUtils.getShortName(CompileWithForkedClassLoader.class));
}
@Test