RFR: 8062036: ConcurrentMarkThread::slt may be invoked before ConcurrentMarkThread::makeSurrogateLockerThread causing intermittent crashes
Kim Barrett
kim.barrett at oracle.com
Tue Nov 4 16:13:17 UTC 2014
On Nov 4, 2014, at 4:13 AM, Bengt Rutisson <bengt.rutisson at oracle.com> wrote:
>
> Regarding assignments in if statements;
Technically, it’s not an assignment, it’s a declaration.
> I thought we had a style where we use booleans for comparisons. This means that I would prefer Jon's suggestion since the comparison will be on a bool value rather than relying on that NULL is interpreted as false.
>
> The hotspot style guidelines does not cover a lot and I guess it is open for interpretation whether or not this case is covered. But there is a short sentence about booleans:
> https://wiki.openjdk.java.net/display/HotSpot/StyleGuide#StyleGuide-Booleans
>
> I interpret "use true & false (not 1 & 0)" as that NULL should also not be used as a bool value.
That’s two out of two reviewers voting against this idiom; I’ll change the code and send an updated webrev later today.
More information about the hotspot-gc-dev
mailing list