svn commit: r1491175 - /commons/proper/csv/trunk/pom.xml

2013-06-09 Thread britter
Author: britter
Date: Sun Jun  9 10:18:42 2013
New Revision: 1491175

URL: http://svn.apache.org/r1491175
Log:
Use viewvc instead of raw svn url

Modified:
commons/proper/csv/trunk/pom.xml

Modified: commons/proper/csv/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/pom.xml?rev=1491175r1=1491174r2=1491175view=diff
==
--- commons/proper/csv/trunk/pom.xml (original)
+++ commons/proper/csv/trunk/pom.xml Sun Jun  9 10:18:42 2013
@@ -94,7 +94,7 @@ CSV files of various types.
   scm
 
connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/csv/trunk/connection
 
developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/csv/trunk/developerConnection
-urlhttp://svn.apache.org/repos/asf/commons/proper/csv/trunk/url
+urlhttp://svn.apache.org/viewvc/commons/proper/csv/trunk/url
   /scm
 
   issueManagement




svn commit: r1491177 - in /commons/proper/compress/trunk/src/site/xdoc: examples.xml index.xml

2013-06-09 Thread bodewig
Author: bodewig
Date: Sun Jun  9 10:24:20 2013
New Revision: 1491177

URL: http://svn.apache.org/r1491177
Log:
not the current limitations of 7z and arj support

Modified:
commons/proper/compress/trunk/src/site/xdoc/examples.xml
commons/proper/compress/trunk/src/site/xdoc/index.xml

Modified: commons/proper/compress/trunk/src/site/xdoc/examples.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/examples.xml?rev=1491177r1=1491176r2=1491177view=diff
==
--- commons/proper/compress/trunk/src/site/xdoc/examples.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/examples.xml Sun Jun  9 
10:24:20 2013
@@ -32,9 +32,10 @@
 compressed) archive are archiver formats./p
 
 pThe compressor formats supported are gzip, bzip2, xz and
-Pack200, the archiver formats are ar, cpio, dump (read-only),
-tar, zip, 7z and arj.  Pack200 is a special case as it can only
-compress JAR files./p
+Pack200, the archiver formats are ar, cpio, tar and zip as
+well as dump, 7z and arj for which we currently only support
+reading.  Pack200 is a special case as it can only compress
+JAR files./p
   /subsection
 
   subsection name=Common Notes
@@ -426,6 +427,11 @@ xzIn.close();
 
   subsection name=7z
 
+pNote that Commons Compress currently only supports
+uncompressed entries or entries compressed using BZIP2 or
+LZMA2 and no header compression at all.  Only AES-256/SHA-256
+are supported for encryption./p
+
 pUncompressing a given 7z archive (you would
   certainly add exception handling and make sure all streams
   get closed properly):/p
@@ -441,6 +447,9 @@ LOOP UNTIL entry.getSize() HAS BEEN READ
 
   subsection name=arj
 
+pNote that Commons Compress doesn't support compressed,
+encrypted or multi-volume ARJ archives, yet./p
+
 pUncompressing a given arj archive (you would
   certainly add exception handling and make sure all streams
   get closed properly):/p

Modified: commons/proper/compress/trunk/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/index.xml?rev=1491177r1=1491176r2=1491177view=diff
==
--- commons/proper/compress/trunk/src/site/xdoc/index.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/index.xml Sun Jun  9 10:24:20 
2013
@@ -76,7 +76,8 @@
 archivers where the a href=zip.htmlzip/a
 implementation provides capabilities that go beyond the
 features found in java.util.zip.  As of Commons Compress
-1.3 support for the dump, 7z and arj formats is read-only./p
+1.6 support for the dump, 7z and arj formats is
+read-only./p
 
   pThe compress component provides abstract base classes for
 compressors and archivers together with factories that can




svn commit: r1491178 - /commons/proper/csv/trunk/pom.xml

2013-06-09 Thread britter
Author: britter
Date: Sun Jun  9 10:25:50 2013
New Revision: 1491178

URL: http://svn.apache.org/r1491178
Log:
Update to latest commons parent pom

Modified:
commons/proper/csv/trunk/pom.xml

Modified: commons/proper/csv/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/csv/trunk/pom.xml?rev=1491178r1=1491177r2=1491178view=diff
==
--- commons/proper/csv/trunk/pom.xml (original)
+++ commons/proper/csv/trunk/pom.xml Sun Jun  9 10:25:50 2013
@@ -21,7 +21,7 @@ limitations under the License.
   parent
 groupIdorg.apache.commons/groupId
 artifactIdcommons-parent/artifactId
-version28/version
+version30/version
   /parent
   groupIdorg.apache.commons/groupId
   artifactIdcommons-csv/artifactId




svn commit: r865011 - in /websites/production/commons/content/proper/commons-compress: ./ apidocs/ apidocs/org/apache/commons/compress/archivers/arj/ apidocs/org/apache/commons/compress/archivers/tar/

2013-06-09 Thread bodewig
Author: bodewig
Date: Sun Jun  9 10:31:02 2013
New Revision: 865011

Log:
update compress' site


[This commit notification would consist of 58 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]


svn commit: r1491182 - /commons/proper/compress/branches/LZMA/

2013-06-09 Thread bodewig
Author: bodewig
Date: Sun Jun  9 11:08:10 2013
New Revision: 1491182

URL: http://svn.apache.org/r1491182
Log:
create a branch to implement LZMA support

Added:
commons/proper/compress/branches/LZMA/   (props changed)
  - copied from r1491181, commons/proper/compress/trunk/

Propchange: commons/proper/compress/branches/LZMA/
--
--- subclipse:tags (added)
+++ subclipse:tags Sun Jun  9 11:08:10 2013
@@ -0,0 +1,2 @@
+1152546,COMPRESS_1.2,/commons/proper/compress/tags/COMPRESS_1.2,tag
+1196226,COMPRESS_1.3,/commons/proper/compress/tags/COMPRESS_1.3,tag

Propchange: commons/proper/compress/branches/LZMA/
--
--- svn:ignore (added)
+++ svn:ignore Sun Jun  9 11:08:10 2013
@@ -0,0 +1,7 @@
+target
+*.iml
+*.ipr
+*.iws
+.*
+maven-eclipse.xml
+TAGS

Propchange: commons/proper/compress/branches/LZMA/
--
svn:mergeinfo = /commons/proper/compress/branches/zip64:1149597-1152684




svn commit: r1491183 - /commons/proper/compress/branches/LZMA/pom.xml

2013-06-09 Thread bodewig
Author: bodewig
Date: Sun Jun  9 11:09:49 2013
New Revision: 1491183

URL: http://svn.apache.org/r1491183
Log:
use more recent version of XZ for Java

Modified:
commons/proper/compress/branches/LZMA/pom.xml

Modified: commons/proper/compress/branches/LZMA/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/branches/LZMA/pom.xml?rev=1491183r1=1491182r2=1491183view=diff
==
--- commons/proper/compress/branches/LZMA/pom.xml (original)
+++ commons/proper/compress/branches/LZMA/pom.xml Sun Jun  9 11:09:49 2013
@@ -60,7 +60,7 @@ These include: bzip2, gzip, pack200, xz 
 dependency
   groupIdorg.tukaani/groupId
   artifactIdxz/artifactId
-  version1.3/version
+  version1.4-SNAPSHOT/version
 /dependency
   /dependencies
 




svn commit: r1491184 - /commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java

2013-06-09 Thread britter
Author: britter
Date: Sun Jun  9 11:38:12 2013
New Revision: 1491184

URL: http://svn.apache.org/r1491184
Log:
Correct typo in exception message

Modified:

commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java

Modified: 
commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java?rev=1491184r1=1491183r2=1491184view=diff
==
--- 
commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java
 (original)
+++ 
commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java
 Sun Jun  9 11:38:12 2013
@@ -151,7 +151,7 @@ public class XmlConfigParser implements 
 digester.parse(url);
 } catch (Exception e) {
 String msg = String.format(
-Error parsing digestor configuration at url: %s,
+Error parsing digester configuration at url: %s,
 url);
 throw new ChainConfigurationException(msg, e);
 }




svn commit: r1491185 - in /commons/proper/compress/branches/LZMA/src: main/java/org/apache/commons/compress/compressors/ main/java/org/apache/commons/compress/compressors/lzma/ test/java/org/apache/co

2013-06-09 Thread bodewig
Author: bodewig
Date: Sun Jun  9 11:49:03 2013
New Revision: 1491185

URL: http://svn.apache.org/r1491185
Log:
COMPRESS-111 read-only support for LZMA

Added:

commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/lzma/

commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java
   (with props)

commons/proper/compress/branches/LZMA/src/test/java/org/apache/commons/compress/compressors/LZMATestCase.java
   (with props)
commons/proper/compress/branches/LZMA/src/test/resources/bla.tar.lzma   
(with props)
Modified:

commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java

Modified: 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java?rev=1491185r1=1491184r2=1491185view=diff
==
--- 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
 (original)
+++ 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
 Sun Jun  9 11:49:03 2013
@@ -26,6 +26,7 @@ import org.apache.commons.compress.compr
 import 
org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
 import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
 import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
+import org.apache.commons.compress.compressors.lzma.LZMACompressorInputStream;
 import org.apache.commons.compress.compressors.xz.XZCompressorInputStream;
 import org.apache.commons.compress.compressors.xz.XZCompressorOutputStream;
 import org.apache.commons.compress.compressors.xz.XZUtils;
@@ -83,6 +84,12 @@ public class CompressorStreamFactory {
  */
 public static final String XZ = xz;
 
+/**
+ * Constant used to identify the LZMA compression method.
+ * @since 1.6
+ */
+public static final String LZMA = lzma;
+
 private boolean decompressConcatenated = false;
 
 /**
@@ -156,7 +163,7 @@ public class CompressorStreamFactory {
 /**
  * Create a compressor input stream from a compressor name and an input 
stream.
  * 
- * @param name of the compressor, i.e. gz, bzip2, xz, or pack200
+ * @param name of the compressor, i.e. gz, bzip2, xz, lzma, or 
pack200
  * @param in the input stream
  * @return compressor input stream
  * @throws CompressorException if the compressor name is not known
@@ -183,6 +190,10 @@ public class CompressorStreamFactory {
 return new XZCompressorInputStream(in);
 }
 
+if (LZMA.equalsIgnoreCase(name)) {
+return new LZMACompressorInputStream(in);
+}
+
 if (PACK200.equalsIgnoreCase(name)) {
 return new Pack200CompressorInputStream(in);
 }

Added: 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java?rev=1491185view=auto
==
--- 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java
 (added)
+++ 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/compressors/lzma/LZMACompressorInputStream.java
 Sun Jun  9 11:49:03 2013
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.commons.compress.compressors.lzma;
+
+import java.io.IOException;
+import java.io.InputStream;
+import org.tukaani.xz.LZMAInputStream;
+
+import org.apache.commons.compress.compressors.CompressorInputStream;
+

Nexus: Staging Repository Dropped.

2013-06-09 Thread Nexus Repository Manager
Description:Incorrect repoDetails:The org.apache.commons-002 (u:sebb, a:80.176.146.62) staging repository has been dropped.

Nexus: Staging Repository Dropped.

2013-06-09 Thread Nexus Repository Manager
Description:Incorrect repoDetails:The org.apache.commons-001 (u:sebb, a:80.176.146.62) staging repository has been dropped.

svn commit: r1491187 - in /commons/proper/compress/branches/LZMA/src/site/xdoc: examples.xml index.xml

2013-06-09 Thread bodewig
Author: bodewig
Date: Sun Jun  9 12:01:21 2013
New Revision: 1491187

URL: http://svn.apache.org/r1491187
Log:
COMPRESS-111 document lzma support

Modified:
commons/proper/compress/branches/LZMA/src/site/xdoc/examples.xml
commons/proper/compress/branches/LZMA/src/site/xdoc/index.xml

Modified: commons/proper/compress/branches/LZMA/src/site/xdoc/examples.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/branches/LZMA/src/site/xdoc/examples.xml?rev=1491187r1=1491186r2=1491187view=diff
==
--- commons/proper/compress/branches/LZMA/src/site/xdoc/examples.xml (original)
+++ commons/proper/compress/branches/LZMA/src/site/xdoc/examples.xml Sun Jun  9 
12:01:21 2013
@@ -31,11 +31,13 @@
 collect multiple entries inside a single (potentially
 compressed) archive are archiver formats./p
 
-pThe compressor formats supported are gzip, bzip2, xz and
+pThe compressor formats supported are gzip, bzip2, xz, lzma and
 Pack200, the archiver formats are ar, cpio, tar and zip as
 well as dump, 7z and arj for which we currently only support
 reading.  Pack200 is a special case as it can only compress
 JAR files./p
+
+pWe currently only provide read support for lzma as well./p
   /subsection
 
   subsection name=Common Notes
@@ -76,6 +78,10 @@ CompressorInputStream input = new Compre
 .createCompressorInputStream(originalInput);
 ]]/source
 
+pNote that there is no way to detect the lzma format so only
+the two-arg version of
+codecreateCompressorInputStream/code can be used./p
+
   /subsection
 
   subsection name=Unsupported Features
@@ -425,6 +431,30 @@ xzIn.close();
 ]]/source
   /subsection
 
+  subsection name=lzma
+
+pThe implementation of this package is provided by the
+  public domain a href=http://tukaani.org/xz/java.html;XZ
+  for Java/a library./p
+
+pUncompressing a given lzma compressed file (you would
+  certainly add exception handling and make sure all streams
+  get closed properly):/p
+source![CDATA[
+FileInputStream fin = new FileInputStream(archive.tar.lzma);
+BufferedInputStream in = new BufferedInputStream(fin);
+FileOutputStream out = new FileOutputStream(archive.tar);
+LZMACompressorInputStream lzmaIn = new LZMACompressorInputStream(in);
+final byte[] buffer = new byte[buffersize];
+int n = 0;
+while (-1 != (n = xzIn.read(buffer))) {
+out.write(buffer, 0, n);
+}
+out.close();
+lzmaIn.close();
+]]/source
+  /subsection
+
   subsection name=7z
 
 pNote that Commons Compress currently only supports

Modified: commons/proper/compress/branches/LZMA/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/branches/LZMA/src/site/xdoc/index.xml?rev=1491187r1=1491186r2=1491187view=diff
==
--- commons/proper/compress/branches/LZMA/src/site/xdoc/index.xml (original)
+++ commons/proper/compress/branches/LZMA/src/site/xdoc/index.xml Sun Jun  9 
12:01:21 2013
@@ -27,7 +27,7 @@
 p
 The Apache Commons Compress library defines an API for
 working with ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200,
-bzip2, 7z and arj files.
+bzip2, 7z, arj and lzma files.
 /p
 p
 The code in this component has many origins:
@@ -64,13 +64,14 @@
 by codeArchiveEntry/code instances which in turn
 usually correspond to single files or directories./p
 
-  pCurrently the bzip2, Pack200, XZ and gzip formats are
+  pCurrently the bzip2, Pack200, XZ, gzip and lzma formats are
 supported as compressors where gzip support is mostly provided by
 the codejava.util.zip/code package and Pack200 support
 by the codejava.util.jar/code package of the Java
-class library.  XZ support is provided by the public
+class library.  XZ and lzma support is provided by the public
 domain a href=http://tukaani.org/xz/java.html;XZ for
-Java/a library./p
+Java/a library.  As of Commons Compress 1.6 support for
+the lzma formats is read-only./p
 
   pThe ar, arj, cpio, dump, tar, 7z and zip formats are supported as
 archivers where the a href=zip.htmlzip/a




svn commit: r1491189 - /commons/proper/chain/trunk/src/site/xdoc/building.xml

2013-06-09 Thread britter
Author: britter
Date: Sun Jun  9 12:10:13 2013
New Revision: 1491189

URL: http://svn.apache.org/r1491189
Log:
Chain 2 requires Java 5

Modified:
commons/proper/chain/trunk/src/site/xdoc/building.xml

Modified: commons/proper/chain/trunk/src/site/xdoc/building.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/site/xdoc/building.xml?rev=1491189r1=1491188r2=1491189view=diff
==
--- commons/proper/chain/trunk/src/site/xdoc/building.xml (original)
+++ commons/proper/chain/trunk/src/site/xdoc/building.xml Sun Jun  9 12:10:13 
2013
@@ -28,8 +28,7 @@ limitations under the License.
   a href=http://ant.apache.org;Ant/a as a build system.
 /p
 p
-  Chain 1.2 requires a minimum of JDK 1.3 to build, although the Maven 2 build
-  requires JDK 1.4+
+  Chain 2.0 requires a minimum of JDK 1.5 to build.
 /p
 /section
 section name=Maven 2 Goals




svn commit: r1491200 - /commons/proper/chain/trunk/pom.xml

2013-06-09 Thread britter
Author: britter
Date: Sun Jun  9 12:28:17 2013
New Revision: 1491200

URL: http://svn.apache.org/r1491200
Log:
Update to latest commons parent pom

Modified:
commons/proper/chain/trunk/pom.xml

Modified: commons/proper/chain/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/pom.xml?rev=1491200r1=1491199r2=1491200view=diff
==
--- commons/proper/chain/trunk/pom.xml (original)
+++ commons/proper/chain/trunk/pom.xml Sun Jun  9 12:28:17 2013
@@ -23,7 +23,7 @@
   parent
 groupIdorg.apache.commons/groupId
 artifactIdcommons-parent/artifactId
-version28/version
+version30/version
   /parent
 
   groupIdorg.apache.commons/groupId




svn commit: r1491216 - in /commons/proper/compress/branches/LZMA/src: main/java/org/apache/commons/compress/archivers/sevenz/Coders.java test/java/org/apache/commons/compress/archivers/sevenz/SevenZFi

2013-06-09 Thread bodewig
Author: bodewig
Date: Sun Jun  9 13:34:26 2013
New Revision: 1491216

URL: http://svn.apache.org/r1491216
Log:
Add LZMA support to 7z - I don't think this adds support for compressed headers

Added:
commons/proper/compress/branches/LZMA/src/test/resources/bla.7z   (with 
props)
Modified:

commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java

commons/proper/compress/branches/LZMA/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java

Modified: 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java?rev=1491216r1=1491215r2=1491216view=diff
==
--- 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java
 (original)
+++ 
commons/proper/compress/branches/LZMA/src/main/java/org/apache/commons/compress/archivers/sevenz/Coders.java
 Sun Jun  9 13:34:26 2013
@@ -31,6 +31,7 @@ import javax.crypto.spec.IvParameterSpec
 import javax.crypto.spec.SecretKeySpec;
 
 import 
org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
+import org.tukaani.xz.LZMAInputStream;
 import org.tukaani.xz.LZMA2InputStream;
 
 class Coders {
@@ -47,6 +48,7 @@ class Coders {
 
 static CoderId[] coderTable = new CoderId[] {
 new CoderId(new byte[] { (byte)0x00 }, new CopyDecoder()),
+new CoderId(new byte[] { (byte)0x03, (byte)0x01, (byte)0x01 }, new 
LZMADecoder()),
 new CoderId(new byte[] { (byte)0x21 }, new LZMA2Decoder()),
 // FIXME: gives corrupt output
 //new CoderId(new byte[] { (byte)0x04, (byte)0x01, (byte)0x08 }, new 
DeflateDecoder()),
@@ -98,6 +100,22 @@ class Coders {
 }
 }
 
+static class LZMADecoder extends CoderBase {
+@Override
+InputStream decode(final InputStream in, final Coder coder,
+String password) throws IOException {
+byte propsByte = coder.properties[0];
+long dictSize = coder.properties[1];
+for (int i = 1; i  4; i++) {
+dictSize |= (coder.properties[i + 1]  (8 * i));
+}
+if (dictSize  LZMAInputStream.DICT_SIZE_MAX) {
+throw new IOException(Dictionary larger than 4GiB maximum 
size);
+}
+return new LZMAInputStream(in, -1, propsByte, (int) dictSize);
+}
+}
+
 //static class DeflateDecoder extends CoderBase {
 //@Override
 //InputStream decode(final InputStream in, final Coder coder, final 
String password)

Modified: 
commons/proper/compress/branches/LZMA/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/branches/LZMA/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java?rev=1491216r1=1491215r2=1491216view=diff
==
--- 
commons/proper/compress/branches/LZMA/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
 (original)
+++ 
commons/proper/compress/branches/LZMA/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZFileTest.java
 Sun Jun  9 13:34:26 2013
@@ -20,6 +20,9 @@ package org.apache.commons.compress.arch
 import org.apache.commons.compress.AbstractTestCase;
 
 public class SevenZFileTest extends AbstractTestCase {
+private static String TEST2_CONTENT = ?xml version = 
'1.0'?\r\n!DOCTYPE
++  connections\r\nmeinxml\r\n\tleer /\r\n/meinxml\n;
+
 public void testAllEmptyFilesArchive() throws Exception {
 SevenZFile archive = new SevenZFile(getFile(7z-empty-mhc-off.7z));
 try {
@@ -37,6 +40,27 @@ public class SevenZFileTest extends Abst
 checkHelloWorld(7z-hello-mhc-off-lzma2.7z);
 }
 
+public void test7zUnarchive() throws Exception {
+SevenZFile sevenZFile = new SevenZFile(getFile(bla.7z));
+try {
+SevenZArchiveEntry entry = sevenZFile.getNextEntry();
+assertEquals(test1.xml, entry.getName());
+entry = sevenZFile.getNextEntry();
+assertEquals(test2.xml, entry.getName());
+byte[] contents = new byte[(int)entry.getSize()];
+int off = 0;
+while ((off  contents.length)) {
+int bytesRead = sevenZFile.read(contents, off, contents.length 
- off);
+assert(bytesRead = 0);
+off += bytesRead;
+}
+assertEquals(TEST2_CONTENT, new String(contents, UTF-8));
+assertNull(sevenZFile.getNextEntry());
+} finally {
+sevenZFile.close();
+}
+}
+
 private void 

svn commit: r1491258 - in /commons/proper/collections/trunk: RELEASE-NOTES.txt src/changes/changes.xml src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java

2013-06-09 Thread tn
Author: tn
Date: Sun Jun  9 18:35:24 2013
New Revision: 1491258

URL: http://svn.apache.org/r1491258
Log:
[COLLECTIONS-472] Improved performance of AbstractMapBag#containsAll. Thanks to 
Adrian Nistor.

Modified:
commons/proper/collections/trunk/RELEASE-NOTES.txt
commons/proper/collections/trunk/src/changes/changes.xml

commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java

Modified: commons/proper/collections/trunk/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/commons/proper/collections/trunk/RELEASE-NOTES.txt?rev=1491258r1=1491257r2=1491258view=diff
==
--- commons/proper/collections/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/collections/trunk/RELEASE-NOTES.txt Sun Jun  9 18:35:24 2013
@@ -182,6 +182,8 @@ Changed classes / methods
 Fixed Bugs
 --
 
+ o [COLLECTIONS-472] Improved performance of 
AbstractMapBag#containsAll(Collection) by returning immediately
+ after a difference has been found. Thanks to Adrian 
Nistor.
  o [COLLECTIONS-461] Added additional clarification to javadoc of interface 
Put wrt return type of
  put(Object, Object) method. Thanks to Matt Benson, 
sebb. 
  o [COLLECTIONS-447] Tree traversal with a TreeListIterator will not be 
affected anymore by the removal of an element directly after

Modified: commons/proper/collections/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/changes/changes.xml?rev=1491258r1=1491257r2=1491258view=diff
==
--- commons/proper/collections/trunk/src/changes/changes.xml (original)
+++ commons/proper/collections/trunk/src/changes/changes.xml Sun Jun  9 
18:35:24 2013
@@ -22,6 +22,10 @@
   body
 
   release version=4.0 date=TBA description=Next release
+action issue=COLLECTIONS-472 dev=tn type=fix due-to=Adrian Nistor
+  Improved performance of AbstractMapBag#containsAll(Collection) by 
returning immediately
+  after a difference has been found.
+/action  
 action issue=COLLECTIONS-466 dev=tn type=update
   Replaced Collection with Iterable for method arguments where 
applicable.
 /action  

Modified: 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
URL: 
http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java?rev=1491258r1=1491257r2=1491258view=diff
==
--- 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
 (original)
+++ 
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/bag/AbstractMapBag.java
 Sun Jun  9 18:35:24 2013
@@ -147,14 +147,14 @@ public abstract class AbstractMapBagE 
  * @return codetrue/code if the Bag contains all the collection
  */
 boolean containsAll(final Bag? other) {
-boolean result = true;
 final Iterator? it = other.uniqueSet().iterator();
 while (it.hasNext()) {
 final Object current = it.next();
-final boolean contains = getCount(current) = 
other.getCount(current);
-result = result  contains;
+if (getCount(current)  other.getCount(current)) {
+return false;
+}
 }
-return result;
+return true;
 }
 
 //---