mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 08:34:30 +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
|
@ -67,7 +67,7 @@ public class TestDefaultBody {
|
|||
MethodModel testMethod = null;
|
||||
CodeAttribute codeAttr = null;
|
||||
for (MethodModel m : cf.methods()) {
|
||||
codeAttr = m.findAttribute(Attributes.CODE).orElse(null);
|
||||
codeAttr = m.findAttribute(Attributes.code()).orElse(null);
|
||||
String mname = m.methodName().stringValue();
|
||||
if (mname.equals(TEST_METHOD_NAME)) {
|
||||
testMethod = m;
|
||||
|
|
|
@ -86,7 +86,7 @@ public class TestDirectSuperInterfaceInvoke {
|
|||
try {
|
||||
final ClassModel cf = ClassFile.of().parse(file.toPath());
|
||||
for (MethodModel m : cf.methods()) {
|
||||
CodeAttribute codeAttr = m.findAttribute(Attributes.CODE).orElseThrow();
|
||||
CodeAttribute codeAttr = m.findAttribute(Attributes.code()).orElseThrow();
|
||||
for (CodeElement ce : codeAttr.elementList()) {
|
||||
if (ce instanceof InvokeInstruction instr && instr.opcode() == Opcode.INVOKESPECIAL) {
|
||||
MemberRefEntry ref = instr.method();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue