mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8308753: Class-File API transition to Preview
Reviewed-by: ihse, mchung, vromero
This commit is contained in:
parent
b9df827adc
commit
2b00ac0d02
681 changed files with 7518 additions and 6502 deletions
|
@ -25,12 +25,8 @@
|
|||
* @test
|
||||
* @bug 8025998 8026749 8054220 8058227
|
||||
* @summary Missing LV table in lambda bodies
|
||||
* @modules java.base/jdk.internal.classfile
|
||||
* java.base/jdk.internal.classfile.attribute
|
||||
* java.base/jdk.internal.classfile.constantpool
|
||||
* java.base/jdk.internal.classfile.instruction
|
||||
* java.base/jdk.internal.classfile.components
|
||||
* java.base/jdk.internal.classfile.impl
|
||||
* @enablePreview
|
||||
* @modules java.base/jdk.internal.classfile.impl
|
||||
* @compile -g LocalVariableTable.java
|
||||
* @run main LocalVariableTable
|
||||
*/
|
||||
|
@ -38,8 +34,8 @@
|
|||
import java.io.*;
|
||||
import java.lang.annotation.*;
|
||||
import java.util.*;
|
||||
import jdk.internal.classfile.*;
|
||||
import jdk.internal.classfile.attribute.*;
|
||||
import java.lang.classfile.*;
|
||||
import java.lang.classfile.attribute.*;
|
||||
|
||||
/*
|
||||
* The test checks that a LocalVariableTable attribute is generated for the
|
||||
|
@ -87,7 +83,7 @@ public class LocalVariableTable {
|
|||
return;
|
||||
}
|
||||
|
||||
ClassModel cm = Classfile.of().parse(Objects.requireNonNull(getClass().getResource(c.getName() + ".class")).openStream().readAllBytes());
|
||||
ClassModel cm = ClassFile.of().parse(Objects.requireNonNull(getClass().getResource(c.getName() + ".class")).openStream().readAllBytes());
|
||||
MethodModel m = getLambdaMethod(cm);
|
||||
if (m == null) {
|
||||
error("lambda method not found");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue