RFR: 8264742: member variable _monitor of MonitorLocker is redundant
Xin Liu
xliu at openjdk.java.net
Tue Apr 6 17:46:30 UTC 2021
On Tue, 6 Apr 2021 12:18:41 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> This is ok. I was worried about the cast defeating type safety but as long as as_monitor is in MonitorLocker, that's fine.
hi, Coleen,
Thank you for reviewing this patch!
FWIW, the type of _mutex is Monitor* in MonitorLocker object. `static_cast<Monitor*>` just makes use that. Arbitrary casting is error-prone, but this is not the case.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3350
More information about the hotspot-runtime-dev
mailing list