[9] RFR of 8143394: PushbackReader throws NullPointerException
Brian Burkhalter
brian.burkhalter at oracle.com
Tue Dec 8 00:11:39 UTC 2015
On Dec 4, 2015, at 12:48 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> The only other possible issue I spotted is in the test:
>
> Because readers[0] is set by one thread and read by both then using
> an array without synchronization is not thread safe. I would
> advise using an AtomicReference instead.
The only point of the threads is to provoke a race condition so I don’t know that it matters in this case. Nonetheless I updated the test case per the suggestion and verified that it still provokes the failure in the build not containing the patch.
Thanks,
Brian
More information about the core-libs-dev
mailing list