mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +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
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue