RFR 8081634: Concurrent usage of a StringBuilder causes test intermittent failures

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Thu Jun 18 11:10:14 UTC 2015

Looks good.


On 6/17/15 11:54 AM, Jaroslav Bachorik wrote:
> Please, review the following test change
> Issue : https://bugs.openjdk.java.net/browse/JDK-8081634
> Webrev: http://cr.openjdk.java.net/~jbachorik/8081634/webrev.00
> This is an issue in the utility class providing the functionality to 
> run the 'jcmd' command and parse its output. The jcmd command output 
> is being captured in a separate thread and fed to a shared 
> StringBuilder instance. StringBuilder not being synchronized this 
> might lead to intermittent failures due to (mostly) the write 
> visibility. The fix is to use StringBuffer which is the appropriate 
> class for this kind of usage.
> Thanks,
> -JB-

More information about the serviceability-dev mailing list