On Tue, 9 Apr 2024 09:32:38 GMT, Adam Sotona <asot...@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 > > Adam Sotona has updated the pull request incrementally with one additional > commit since the last revision: > > added NPE statement to package-info While the @throws is not technically necessary here, specifying it here is reasonable. ------------- Marked as reviewed by briangoetz (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18578#pullrequestreview-1989201955