jmx-dev Codereview request: 8025206 IIntermittent test failure:	javax/management/monitor/NullAttributeValueTest.java
    David Holmes 
    david.holmes at oracle.com
       
    Tue Oct  8 18:15:19 PDT 2013
    
    
  
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
    
    
More information about the serviceability-dev
mailing list