8308753: Class-File API transition to Preview

Reviewed-by: ihse, mchung, vromero
This commit is contained in:
Adam Sotona 2023-12-04 07:07:57 +00:00
parent b9df827adc
commit 2b00ac0d02
681 changed files with 7518 additions and 6502 deletions

View file

@ -25,6 +25,7 @@
* @test
* @bug 8210009
* @summary Source Launcher classloader should support getResource and getResourceAsStream
* @enablePreview
* @modules jdk.compiler
* @library /tools/lib
* @build toolbox.JavaTask toolbox.ToolBox
@ -53,8 +54,7 @@ public class GetResourceTest {
ToolBox tb = new ToolBox();
Path file = Paths.get(tb.testSrc).resolve("src").resolve("CLTest.java");
new JavaTask(tb)
.vmOptions("--add-exports", "java.base/jdk.internal.classfile=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED")
.vmOptions("--enable-preview", "--source", String.valueOf(Runtime.version().feature()))
.className(file.toString()) // implies source file mode
.run(Task.Expect.SUCCESS)
.writeAll();