RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode [v4]
Adam Sotona
asotona at openjdk.org
Tue Apr 9 09:32:38 UTC 2024
> `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
Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
added NPE statement to package-info
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18578/files
- new: https://git.openjdk.org/jdk/pull/18578/files/71165f1e..7af3f7c5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18578&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18578&range=02-03
Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/18578.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18578/head:pull/18578
PR: https://git.openjdk.org/jdk/pull/18578
More information about the core-libs-dev
mailing list