mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8331291: java.lang.classfile.Attributes class performs a lot of static initializations
Reviewed-by: liach, redestad, vromero
This commit is contained in:
parent
0c934ff4e2
commit
cfdc64fcb4
149 changed files with 1669 additions and 1323 deletions
|
@ -112,7 +112,7 @@ public class TestBootstrapMethodsCount {
|
|||
File compiledTest = new File("Test.class");
|
||||
try {
|
||||
ClassModel cf = ClassFile.of().parse(compiledTest.toPath());
|
||||
BootstrapMethodsAttribute bsm_attr = cf.findAttribute(Attributes.BOOTSTRAP_METHODS).orElseThrow();
|
||||
BootstrapMethodsAttribute bsm_attr = cf.findAttribute(Attributes.bootstrapMethods()).orElseThrow();
|
||||
int length = bsm_attr.bootstrapMethodsSize();
|
||||
if (length != 1) {
|
||||
throw new Error("Bad number of method specifiers " +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue