Integrated: 8361909: ConstantPoolBuilder::loadableConstantEntry and constantValueEntry should throw NPE
Chen Liang
liach at openjdk.org
Mon Jul 14 23:37:43 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.
This pull request has now been integrated.
Changeset: 0acd065b
Author: Chen Liang <liach at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/0acd065bf5a75090b84c28b28856a62d86c52791
Stats: 11 lines in 2 files changed: 8 ins; 0 del; 3 mod
8361909: ConstantPoolBuilder::loadableConstantEntry and constantValueEntry should throw NPE
Reviewed-by: asotona
-------------
PR: https://git.openjdk.org/jdk/pull/26257
More information about the core-libs-dev
mailing list