On Tue, 6 Dec 2022 05:28:24 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Doug Simon has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   renamed is_module_resolvable to is_module_observable
>
> src/hotspot/share/jvmci/jvmci.cpp line 234:
> 
>> 232:     if (thread != nullptr && thread->is_Java_thread()) {
>> 233:       ResourceMark rm;
>> 234:       JavaThreadState state = ((JavaThread*) thread)->thread_state();
> 
> Please use `JavaThread::cast(thread)`

I've made this change. Out of interest, I grep'ed through `src/hotspot` and 
found a few other instances of `(JavaThread*)` style casts. While most of these 
are probably older code, I'm wondering what the guidelines are in this area. I 
assume `JavaThread::cast` should be preferred always given the assertion 
checking it does?

-------------

PR: https://git.openjdk.org/jdk/pull/11513

Reply via email to