RFR: 8364588: Export the NPE backtracking functionality to general null-checking APIs
Johan Sjölen
jsjolen at openjdk.org
Tue Aug 5 09:59:03 UTC 2025
On Tue, 5 Aug 2025 08:32:33 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Provide a general facility for our null check APIs like Objects::requireNonNull or future Checks::nullCheck (void), converting the existing infrastructure to start tracking from a given stack site (depth offset) and a given stack slot (offset value).
>
> src/java.base/share/classes/java/lang/NullPointerException.java line 78:
>
>> 76: NullPointerException(int stackOffset, int searchSlot) {
>> 77: extendedMessageState = setupCustomBackTrace(stackOffset, searchSlot);
>> 78: this();
>
> I thought `this()` had to come first in a constructor? Is this new in 25 or 26?
https://openjdk.org/jeps/492
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26600#discussion_r2253816429
More information about the security-dev
mailing list