RFR: 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode
Adam Sotona
adam.sotona at oracle.com
Tue Apr 2 11:11:13 UTC 2024
Please review following PR and related CSR<https://bugs.openjdk.org/browse/JDK-8329501>.
Thank you!
Adam
`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
-------------
Commit messages:
- 8329099: Undocumented exception thrown by Instruction factory methods accepting Opcode
Changes: https://git.openjdk.org/jdk/pull/18578/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18578&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8329099
Stats: 36 lines in 15 files changed: 36 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20240402/5ce164eb/attachment.htm>
More information about the classfile-api-dev
mailing list