RFR: 8361102: java.lang.classfile.CodeBuilder.branch(Opcode op, Label target) doesn't throw IllegalArgumentException - if op is not of Opcode.Kind.BRANCH
Adam Sotona
asotona at openjdk.org
Fri Jul 11 14:43:43 UTC 2025
On Wed, 9 Jul 2025 21:14:17 GMT, Chen Liang <liach at openjdk.org> wrote:
> Currently, DirectCodeBuilder is erroneously missing argument checks for a few of its override methods that take arguments such as Opcode and the array size for multianewarray and the switches, which would write something before throwing an exception. We correct these problems and verify with some tests.
>
> Note: Other Label-writing methods resolve their label eagerly so they are not (yet) problematic.
Looks good to me.
-------------
Marked as reviewed by asotona (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26229#pullrequestreview-3010583452
More information about the core-libs-dev
mailing list