JDK-8329099 : Undocumented exception thrown by Instruction factory methods accepting Opcode
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.classfile
  • Affected Version: 23
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2024-03-26
  • Updated: 2024-08-16
  • Resolved: 2024-04-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23 b19Fixed
Related Reports
CSR :  
Cloners :  
Description
OperatorInstruction.of(Opcode opcode) for opcode that is not of Opcode.kind.Operator throws an IAE as naturally expected. But this is not documented.

Also
NewPrimitiveArrayInstruction.of(TypeKind typeKind);
doesn't throw any exceptions but it should if typeKind is not the right type
Comments
Changeset: 97c18089 Author: Adam Sotona <asotona@openjdk.org> Date: 2024-04-16 08:23:31 +0000 URL: https://git.openjdk.org/jdk/commit/97c180892b62ccba0041fb4480ecd2191aea0032
16-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18578 Date: 2024-04-02 09:37:52 +0000
02-04-2024

thrown IAE is not documented in the following instructions: - ArrayLoadInstruction - ArrayStoreInstruction - BranchInstruction - ConvertInstruction - DiscontinuedInstruction - FieldInstruction - InvokeInstruction - LoadInstruction - MonitorInstruction - OperatorInstruction - ReturnInstruction - StackInstruction - StoreInstruction - TypeCheckInstruction
02-04-2024