Hi! This patch (in general) enables MT-safe use of ZipFile (e.g. call getEntry() from several threads).
Also, this patch contains the following patch ("Detect encryption.patch") by
Daniel Noll (the patch is necessary to verbosely filter out "encrypted zip"
case, the patch included mostly in the original form except for I only put the
detection code inside the synchronized block):
http://gcc.gnu.org/bugzilla/attachment.cgi?id=15833
ChangeLog entries:
* java/util/zip/ZipEntry.java:
(generalPurposeFlags): New private field (used for "encrypted" flag
only).
(getDOSTime()): Adjust/add parenthesis to make the expression more
readable.
(setGeneralPurposeFlags(int)): New package-private method (used by
ZipFile only).
(isEncrypted()): Likewise.
* java/util/zip/ZipFile.java:
(checkZipFile()): Put the name of the file to the thrown exception
message.
(readEntries()): Invoke setGeneralPurposeFlags().
(finalize()): Comment out (since the only system resource used is
freed by "raf" finalizer).
(entries()): Remove unnecessary checkClosed() invocation (since it
is performed in getEntries()).
(getEntry(String)): Likewise.
(size()): Likewise.
(getInputStream(ZipEntry)): Check for encrypted entry (and throw the
exception with the appropriate message).
(getInputStream(ZipEntry)): Inline getEntries() call and put
checkClosed(), readEntries(), entries.get(), new PartialInputStream()
inside a single synchronized block.
classpath-ivmai-30.diff
Description: Binary data
