You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2019/08/27 18:28:45 UTC
[commons-compress] branch master updated (30a27cf -> 9d2a2f4)
This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git.
from 30a27cf merge 1.19 tag, prepare for next iteration
new 6ef97b8 trailing whitespace
new 9d2a2f4 generic version of Arrays.copyOf is slower than copying manually
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
RELEASE-NOTES.txt | 32 +++++++++++-----------
.../compress/archivers/zip/ZipArchiveEntry.java | 9 ++++--
2 files changed, 22 insertions(+), 19 deletions(-)
[commons-compress] 01/02: trailing whitespace
Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit 6ef97b8ea7e323696be1d3e2022e1de6b0229e09
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Tue Aug 27 20:21:24 2019 +0200
trailing whitespace
---
RELEASE-NOTES.txt | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 45631ad..ec73815 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -25,59 +25,59 @@ o It is now possible to skip parsing of local file headers when
using ZipFile which may speed up reading the archive at the
cost of potentially missing important information. See the
javadocs of the ZipFile class for details.
- Issue: COMPRESS-466.
+ Issue: COMPRESS-466.
o TarArchiveInputStream has a new constructor-arg lenient that
can be used to accept certain broken archives.
- Issue: COMPRESS-469.
+ Issue: COMPRESS-469.
o ArjArchiveEntry and SevenZArchiveEntry now implement hashCode
and equals.
- Issue: COMPRESS-475.
+ Issue: COMPRESS-475.
o Added a MultiReadOnlySeekableByteChannel class
that can be used to concatenate the parts of a multi volume 7z
archive so that SevenZFile can read them.
Issue: COMPRESS-231.
- Thanks to Tim Underwood.
+ Thanks to Tim Underwood.
Fixed Bugs:
o ZipArchiveInputStream could forget the compression level has
- changed under certain circumstances.
+ changed under certain circumstances.
o Fixed another potential resource leak in
ParallelScatterZipCreator#writeTo.
- Issue: COMPRESS-470.
+ Issue: COMPRESS-470.
o ArArchiveInputStream could think it had hit EOF prematurely.
Github Pull Request #74.
- Thanks to Alex Bertram.
+ Thanks to Alex Bertram.
o Throw IOException rather than RuntimeExceptions for certain
malformed LZ4 or Snappy inputs.
- Issue: COMPRESS-490.
+ Issue: COMPRESS-490.
o ZipArchiveInputStream failed to read stored entries with a
data descriptor if the data descriptor didn't use the
signature invented by InfoZIP.
- Issue: COMPRESS-482.
+ Issue: COMPRESS-482.
Changes:
o SevenZFile now provides a way to cap memory consumption for
LZMA(2) compressed content.
Github Pull Request #76.
Issue: COMPRESS-481.
- Thanks to Robin Schimpf.
+ Thanks to Robin Schimpf.
o The ARJ package has been updated to contain constants for more
recent specifications.
Issue: COMPRESS-464.
- Thanks to Rostislav Krasny.
+ Thanks to Rostislav Krasny.
o Update optional library zstd-jni from 1.3.3-3 to 1.4.0-1.
- Issue: COMPRESS-484.
+ Issue: COMPRESS-484.
o ParallelScatterZipCreator now writes the entries to the
gathered output in the same order they have been added.
Github Pull Requests #78 and #79.
Issue: COMPRESS-485.
- Thanks to Hervé Boutemy, Tibor Digana.
+ Thanks to Hervé Boutemy, Tibor Digana.
o The Expander and Archive example classes can leak resources
they have wrapped around passed in streams or channels. The
methods consuming streams and channels have been adapted to
give the calling code a chance to deal with those wrapper
resources.
- Issue: COMPRESS-486.
+ Issue: COMPRESS-486.
o ZipArchiveInputStream and ZipFile no longer assume Commons
Compress would understand extra fields better than the writer
of the archive and silently turn extra fields that Commons
@@ -86,7 +86,7 @@ o ZipArchiveInputStream and ZipFile no longer assume Commons
It is now possible to take more control over the extra field
parsing process with a new overload of
ZipArchiveEntry#getExtraFields.
- Issue: COMPRESS-479.
+ Issue: COMPRESS-479.
o ZipArchiveInputStream will now throw an exception if reading a
stored entry with a data descriptor and the data descriptor
doesn't match what it has actually read.
@@ -102,7 +102,7 @@ o ZipArchiveInputStream will now throw an exception if reading a
The only other explanation is a broken archive. So the
exception prevents users from thinking they had successfully
read the contents of the archive.
- Issue: COMPRESS-483.
+ Issue: COMPRESS-483.
o The 7zip tools provide a default name for archive entries
without name; SevenZFile returns a null name for such
entries. A new method getDefaultName has been added to derive
[commons-compress] 02/02: generic version of Arrays.copyOf is
slower than copying manually
Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit 9d2a2f4a520db29fb1f1bf064979fed0efb7f075
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Tue Aug 27 20:28:03 2019 +0200
generic version of Arrays.copyOf is slower than copying manually
thanks @Tibor17
---
.../apache/commons/compress/archivers/zip/ZipArchiveEntry.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
index 767f615..30f8479 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
@@ -27,8 +27,6 @@ import java.util.Date;
import java.util.List;
import java.util.zip.ZipException;
-import static java.util.Arrays.copyOf;
-
/**
* Extension that adds better handling of extra fields and provides
* access to the internal and external file attributes.
@@ -812,7 +810,7 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
*/
public byte[] getRawName() {
if (rawName != null) {
- return copyOf(rawName, rawName.length);
+ return Arrays.copyOf(rawName, rawName.length);
}
return null;
}
@@ -1082,6 +1080,11 @@ public class ZipArchiveEntry extends java.util.zip.ZipEntry
this.commentSource = commentSource;
}
+ private ZipExtraField[] copyOf(final ZipExtraField[] src, final int length) {
+ final ZipExtraField[] cpy = new ZipExtraField[length];
+ System.arraycopy(src, 0, cpy, 0, Math.min(src.length, length));
+ return cpy;
+ }
/**
* How to try to parse the extra fields.