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/21 05:17:12 UTC

[commons-compress] branch master updated: COMPRESS-478 record changes

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


The following commit(s) were added to refs/heads/master by this push:
     new 352829a  COMPRESS-478 record changes
352829a is described below

commit 352829af6b0486716a683921c2642f30c023bff9
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Wed Aug 21 07:16:55 2019 +0200

    COMPRESS-478 record changes
---
 src/changes/changes.xml    | 12 ++++++++++--
 src/site/xdoc/examples.xml |  8 ++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 63dbc58..ab7ab51 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -151,9 +151,17 @@ when they are read via ZipArchiveInputStream or ZipFile.
       </action>
       <action type="add" date="2019-08-18" issue="COMPRESS-231"
               due-to="Tim Underwood">
-        Added a <code>MultiReadOnlySeekableByteChannel</code> class
+        Added a MultiReadOnlySeekableByteChannel class
         that can be used to concatenate the parts of a multi volume 7z
-        archive so that <code>SevenZFile</code> can read them.
+        archive so that SevenZFile can read them.
+      </action>
+      <action type="update" date="2019-08-20" issue="COMPRESS-478">
+        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
+        the same name the 7zip tools would use and an option has been
+        added that sets SevenZArchiveEntry's name to the default name
+        if it is not contained inside the archive.
       </action>
     </release>
     <release version="1.18" date="2018-08-16"
diff --git a/src/site/xdoc/examples.xml b/src/site/xdoc/examples.xml
index e50ebd9..b295e77 100644
--- a/src/site/xdoc/examples.xml
+++ b/src/site/xdoc/examples.xml
@@ -342,6 +342,14 @@ try (OutputStream fo = Files.newOutputStream(Paths.get("my.tar.gz"));
         <code>org.apache.commons.compress.utils.SeekableInMemoryByteChannel</code>
         allows you to read from or write to an in-memory archive.</p>
 
+        <p>Some 7z archives don't contain any names for the archive
+        entries. The native 7zip tools derive a default name from the
+        name of the archive itself for such entries. Starting with
+        Compress 1.19 <code>SevenZFile</code> has an option to mimic
+        this behavior, but by default unnanmed archive entries will
+        return <code>null</code> from
+        <code>SevenZArchiveEntry#getName</code>.</p>
+
         <p>Adding an entry to a 7z archive:</p>
 <source><![CDATA[
 SevenZOutputFile sevenZOutput = new SevenZOutputFile(file);