On Sat, 13 Feb 2021 15:42:32 GMT, Daniel D. Daugherty <[email protected]>
wrote:
>> And it looks like making is_JavaThread_protected() a protected function
>> doesn't work either since `JavaThread::get_thread_name()` can't call it:
>>
>> ./open/src/hotspot/share/runtime/thread.cpp:2857:15: error:
>> 'is_JavaThread_protected' is a protected member of 'Thread'
>> if (thread->is_JavaThread_protected(this)) {
>> ^
>> ./open/src/hotspot/share/runtime/thread.cpp:488:14: note: can only access
>> this member on an object of type 'JavaThread'
>> bool Thread::is_JavaThread_protected(const JavaThread* p) {
>> ^
>> 1 error generated.
>
> `JavaThread::get_thread_name()` is calling `is_JavaThread_protected()` on the
> calling Thread and NOT on the `this` JavaThread so `protected` doesn't work.
ok.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2535