RFR 8081634: Concurrent usage of a StringBuilder causes test intermittent failures
Staffan Larsen
staffan.larsen at oracle.com
Thu Jun 18 08:50:16 UTC 2015
Looks good!
Thanks,
/Staffan
> On 17 jun 2015, at 20:54, Jaroslav Bachorik <jaroslav.bachorik at oracle.com> 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