On Wed, 17 Jul 2024 20:51:32 GMT, Chen Liang <li...@openjdk.org> wrote:

> Qualify the reading of entry lists with the anticipated types up-front, so we 
> throw the correct `ConstantPoolException` instead of `ClassCastException` 
> when we encounter malformed attribute lists. (`ClassModel.getInterfaces` 
> already behave correctly, in comparison)

test/jdk/jdk/classfile/BoundAttributeTest.java line 87:

> 85:             ((DirectClassBuilder) clb).writeAttribute(new 
> UnboundAttribute.AdHocAttribute<>(Attributes.nestMembers()) {
> 86:                 @Override
> 87:                 public void writeBody(BufWriter b) {

Suggestion:

                public void writeBody(BufWriterImpl b) {

This is a conflict with #20205, whichever is integrated later should update 
this part.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20225#discussion_r1681721559

Reply via email to