RFR: 8361909: ConstantPoolBuilder::loadableConstantEntry and constantValueEntry should throw NPE
Chen Liang
liach at openjdk.org
Mon Jul 14 23:37:42 UTC 2025
On Thu, 10 Jul 2025 22:32:45 GMT, Chen Liang <liach at openjdk.org> wrote:
> Currently, the aforementioned two methods do not throw NPE upon null input, but throw IAE.
>
> This behavior is bad for composition: `bsmEntry` actually throws IAE for nested null in the argument list/array, and other APIs are similarly affected.
>
> Given this domino effect, I think the best way is to fix the API itself to correctly throw NPE instead. A small CSR is opened to record this change.
Thanks for the reviews!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26257#issuecomment-3071336522
More information about the core-libs-dev
mailing list