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

@ -175,8 +175,8 @@ public class MethodParametersTest {
if (!baz.methods().get(0).methodName().equalsString("<init>"))
throw new Exception("Classfile Baz badly formed: method has name " +
baz.methods().get(0).methodName().stringValue());
MethodParametersAttribute mpattr = baz.methods().get(0).findAttribute(Attributes.METHOD_PARAMETERS).orElse(null);
CodeAttribute cattr = baz.methods().get(0).findAttribute(Attributes.CODE).orElse(null);;
MethodParametersAttribute mpattr = baz.methods().get(0).findAttribute(Attributes.methodParameters()).orElse(null);
CodeAttribute cattr = baz.methods().get(0).findAttribute(Attributes.code()).orElse(null);;
if (null == mpattr)
throw new Exception("Classfile Baz badly formed: no method parameters info");
if (null == cattr)