On Tue, 22 Jun 2021 01:59:17 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Guoxiong Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix incorrect use of the method cast > > Hi Guoxiong, > > Thanks for picking up this enhancement request. > > I wasn't sure if this would be worth the churn/disruption to the source code, > but I think it is ok and preferable to use the cast notation. > > The changes look good except for one mistake flagged below. > > Note you need at least two reviewers before integrating this. > > Thanks, > David @dholmes-ora Thanks for your review. I updated the code just now. I am surprised that the `tier1` (locally and the `Pre-submit tests`) can't find the mistake you pointed out. Maybe we can improve the `tier1` or the `Pre-submit tests` in the future. > src/hotspot/share/gc/z/zFuture.inline.hpp line 49: > >> 47: // Wait for notification >> 48: Thread* const thread = Thread::current(); >> 49: if (JavaThread::cast(thread)) { > > This is wrong - we still need the is_Java_thread() query; and cast is not a > boolean operator. Fixed. It's a wrong use of the method `cast`. Thanks for finding it. I re-read my patch to avoid the similar mistake. ------------- PR: https://git.openjdk.java.net/jdk/pull/4546