RFR : 8038491: Improve synchronization in ZipFile.read()

Alan Bateman Alan.Bateman at oracle.com
Wed Apr 9 18:36:15 UTC 2014

On 09/04/2014 18:39, Seán Coffey wrote:
> On re-read, I believe extending the sync block in read(..) to cover 
> the reading and setting of the rem variable works to resolve this fix. 
> It should preserve behaviour as well.
> http://cr.openjdk.java.net/~coffeys/webrev.8038491.v2/webrev/
This is probably okay for a test case that attempts concurrent reads but 
as it's not synchronized with skip then I don't think you can trust the 
value of rem or pos without taking copies and validating.


More information about the core-libs-dev mailing list