8331291: java.lang.classfile.Attributes class performs a lot of static initializations

Reviewed-by: liach, redestad, vromero
This commit is contained in:
Adam Sotona 2024-05-24 15:58:34 +00:00
parent 0c934ff4e2
commit cfdc64fcb4
149 changed files with 1669 additions and 1323 deletions

View file

@ -218,7 +218,7 @@ public class TestLambdaBytecode extends ComboInstance<TestLambdaBytecode> {
fail("Test method not found");
return;
}
CodeAttribute ea = testMethod.findAttribute(Attributes.CODE).orElse(null);
CodeAttribute ea = testMethod.findAttribute(Attributes.code()).orElse(null);
if (ea == null) {
fail("Code attribute for test() method not found");
return;
@ -243,7 +243,7 @@ public class TestLambdaBytecode extends ComboInstance<TestLambdaBytecode> {
return;
}
BootstrapMethodsAttribute bsm_attr = cf.findAttribute(Attributes.BOOTSTRAP_METHODS).orElseThrow();
BootstrapMethodsAttribute bsm_attr = cf.findAttribute(Attributes.bootstrapMethods()).orElseThrow();
if (bsm_attr.bootstrapMethodsSize() != 1) {
fail("Bad number of method specifiers " +
"in BootstrapMethods attribute");

View file

@ -220,7 +220,7 @@ public class TestLambdaBytecodeTargetRelease14 extends ComboInstance<TestLambdaB
fail("Test method not found");
return;
}
CodeAttribute ea = testMethod.findAttribute(Attributes.CODE).orElse(null);
CodeAttribute ea = testMethod.findAttribute(Attributes.code()).orElse(null);
if (ea == null) {
fail("Code attribute for test() method not found");
return;
@ -245,7 +245,7 @@ public class TestLambdaBytecodeTargetRelease14 extends ComboInstance<TestLambdaB
return;
}
BootstrapMethodsAttribute bsm_attr = cm.findAttribute(Attributes.BOOTSTRAP_METHODS).orElseThrow();
BootstrapMethodsAttribute bsm_attr = cm.findAttribute(Attributes.bootstrapMethods()).orElseThrow();
if (bsm_attr.bootstrapMethodsSize() != 1) {
fail("Bad number of method specifiers " +
"in BootstrapMethods attribute");