Shanliang writes:
Daniel Fuchs wrote:
Hi Shanliang,

Shouldn't 'messageReceived' be at least declared as volatile?
It looks as if this test is a multi-thread test which
is not MT-safe.
OK I am convinced:
     http://cr.openjdk.java.net/~sjiang/JDK-8025206/02/

The volatile is definitely needed if the field is written/read by different threads.

I think the rule is to not use @author tags in OpenJDK code.

This comment is not needed:

288     // See 8025206

but I think the bug number should be added to the @bug line.

Otherwise seems reasonable.

Reviewed.

David

Reply via email to