JDK-8338492 : Undocumented exception thrown by Instruction factory methods accepting Opcode - Part 2
Type:Bug
Component:core-libs
Sub-Component:java.lang.classfile
Affected Version:24
Priority:P4
Status:Resolved
Resolution:Not an Issue
Submitted:2024-08-16
Updated:2024-11-06
Resolved:2024-11-06
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.
Undocumented NPE from CodeBuilderPREVIEW exceptionCatch(... Optional<ClassEntry> catchType)), when catchType is null.
(Optional) null and not Optional.empty().
Comments
Yes, there is a general statement about null handling at package info:
https://download.java.net/java/early_access/jdk23/docs/api/java.base/java/lang/classfile/package-summary.html#writing-classfiles-heading
16-08-2024
NPE is thrown when any of the argument is null. Is there a blanket warning to this very prevalent scenario?