On Wed, 25 Jun 2025 20:48:17 GMT, David Holmes <[email protected]> wrote:
>> Kevin Walls has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - comment update
>> - comment update
>
> src/hotspot/share/services/threadService.cpp line 1477:
>
>> 1475: java_thread = java_lang_Thread::thread(thread_h());
>> 1476: if (java_thread == nullptr) {
>> 1477: return nullptr; // thread terminated
>
> If you return here what does that mean for the null check at line 1483? Is
> that code now dead?
Here, we have this extra null check when is_virtual is false. If not
is_virtual, we really need a java_thread, or give up.
Down at 1483 we might have have is_virtual true, and we also may have found a
java_thread, so I think we need both checks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25958#discussion_r2167627054