On Tue, 5 Aug 2025 14:28:37 GMT, Chen Liang <li...@openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 637: >> >>> 635: /// Stack offset is the number of non-hidden frames to skip, >>> pointing to the null-checking API. >>> 636: /// Search slot is the slot where the null-checked value is passed >>> in. >>> 637: NullPointerException extendedNullPointerException(int stackOffset, >>> int searchSlot); >> >> Method should **not** be added to SharedSecrets solely for access by tests. >> Tests can use @modules to gain access. > > This is intended to be an API directly called by future null-check APIs, like > `Objects.requireNonNull` or `Checks.nullCheck`. I initially had code for rNN > but decided to withhold that for a future patch since it involves CSR and > other evaluations not related to this patch's efforts. Don't add APIs without uses; it speculative and the API may not be what is really needed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26600#discussion_r2254604180