Integrated: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode
Adam Sotona
asotona at openjdk.org
Tue Apr 16 08:27:07 UTC 2024
On Tue, 2 Apr 2024 09:37:52 GMT, Adam Sotona <asotona at openjdk.org> wrote:
> `IllegalArgumentException` thrown by some static factory methods of the following `java.lang.classfile.instruction` interfaces are not documented:
>
> - `ArrayLoadInstruction`
> - `ArrayStoreInstruction`
> - `BranchInstruction`
> - `ConvertInstruction`
> - `DiscontinuedInstruction`
> - `FieldInstruction`
> - `InvokeInstruction`
> - `LoadInstruction`
> - `MonitorInstruction`
> - `NewPrimitiveArrayInstruction`
> - `OperatorInstruction`
> - `ReturnInstruction`
> - `StackInstruction`
> - `StoreInstruction`
> - `TypeCheckInstruction`
>
> `NewPrimitiveArrayInstruction::of` factory method also does not perform the check for invalid argument.
>
> This patch adds all the missing `@throws` Javadoc tags and fixes `NewPrimitiveArrayInstruction::of` factory method to perform the argument check.
>
> Please review.
>
> Thank you,
> Adam
This pull request has now been integrated.
Changeset: 97c18089
Author: Adam Sotona <asotona at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/97c180892b62ccba0041fb4480ecd2191aea0032
Stats: 48 lines in 17 files changed: 48 ins; 0 del; 0 mod
8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode
Reviewed-by: briangoetz
-------------
PR: https://git.openjdk.org/jdk/pull/18578
More information about the core-libs-dev
mailing list