RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v5]

Adam Sotona asotona at openjdk.org
Tue May 14 09:22:04 UTC 2024


On Mon, 13 May 2024 17:17:40 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - fixed error thrown by VerifierImpl
>>  - applied suggested changes
>
> src/java.base/share/classes/jdk/internal/classfile/impl/verifier/ParserVerifier.java line 283:
> 
>> 281:                 yield l;
>> 282:             }
>> 283:             case RuntimeVisibleAnnotationsAttribute aa -> {
> 
> I wonder if these 4 cases can be consolidated a bit. They all require an annotation accessor, and then something that keeps computes the size of all the annotations. E.g.
> 
> 
> int annotationSize(List<Annotation> annos) {
>                 long size = 0;
>                 for (var an : annos) {
>                     size += annotationSize(an);
>                 }
>                 return l;
> }

Yes, I'll join them to a common method.
Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16809#discussion_r1599681157


More information about the compiler-dev mailing list