RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files [v2]
Adam Sotona
asotona at openjdk.org
Fri May 3 17:13:04 UTC 2024
On Fri, 3 May 2024 16:25:30 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>>
>> applied suggested changes
>
> src/java.base/share/classes/jdk/internal/classfile/impl/ClassReaderImpl.java line 402:
>
>> 400: int tag = readU1(offset);
>> 401: final int q = offset + 1;
>> 402: if (tag == TAG_UTF8) {
>
> Can we call into the tag accepting entryByIndex? e.g.,
>
> if (entryByIndex(index, TAG_UTF8) instanceof AbstractPoolEntry.Utf8EntryImpl utf8) {
> return ...
> }
> throw new ...
>
> ?
Yes, it is a good opportunity to reduce the code a bit.
Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19088#discussion_r1589483133
More information about the core-libs-dev
mailing list