Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.21
-
None
-
None
Description
Sorry if another issue already exists for this, I couldn't find one. When I enable the ignoreLocalFileHeader constructor flag, I started to get BufferOverflowException/BufferUnderFlowException while calling ZipFile.getInputStream(ZipArchiveEntry). Looking at the code, there is some local instances of byte[] and ByteBuffer reused by some private methods that should be the cause of those exceptions. Everything seems fine if ignoreLocalFileHeader is false, but I need to open very large zip files as fast as possible. If I synchronize on ZipFile.getInputStream(ze), it seems to workaround. Actually, I don't know if ZipFile was designed to be thread safe, but it would be nice to be. I also saw some synchronization code in BoundedSeekableByteChannelInputStream class, so not sure if this issue is an enhancement or bug report...