RFR: 8304837: Classfile API throws IOOBE for MethodParameters attribute without parameter names [v3]
Hannes Greule
duke at openjdk.org
Fri Mar 24 06:42:30 UTC 2023
> After merging master into https://github.com/openjdk/jdk/pull/9862, we encountered test failures (e.g., https://github.com/SirYwell/jdk/actions/runs/4500940829/jobs/7923018438#step:9:2541). The Classfile API tries to read from constant pool index 0 if a MethodParameters attribute has an entry without name.
>
> The fix is simply using `readUtf8EntryOrNull` instead of `readUtf8Entry`. The related code already correctly handles nullability.
>
> I didn't find an appropriate test class so I added a new one. Let me know if there's a better place or if the test can be improved somehow.
>
> As I don't have a JBS account, someone needs to create a bug report there for me. Thanks.
Hannes Greule has updated the pull request incrementally with one additional commit since the last revision:
Move and fix test comment
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/13167/files
- new: https://git.openjdk.org/jdk/pull/13167/files/f4b8062c..b77cc1b5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=13167&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=13167&range=01-02
Stats: 12 lines in 1 file changed: 6 ins; 6 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/13167.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13167/head:pull/13167
PR: https://git.openjdk.org/jdk/pull/13167
More information about the core-libs-dev
mailing list