Skip to content

Apache Lucene open-source search software

LUCENE-3457: Upgrade commons-compress to 1.2

Doron Cohene57f2ca6981a
diff --git a/dev-tools/eclipse/dot.classpath b/dev-tools/eclipse/dot.classpath
index 628b379ad6e..01be1fdf4d0 100644
--- a/dev-tools/eclipse/dot.classpath
+++ b/dev-tools/eclipse/dot.classpath
@@ -86,7 +86,7 @@
<classpathentry kind="lib" path="modules/analysis/morfologik/lib/morfologik-stemming-1.5.2.jar"/>
<classpathentry kind="lib" path="modules/benchmark/lib/commons-beanutils-1.7.0.jar"/>
<classpathentry kind="lib" path="modules/benchmark/lib/commons-collections-3.1.jar"/>
- <classpathentry kind="lib" path="modules/benchmark/lib/commons-compress-1.1.jar"/>
+ <classpathentry kind="lib" path="modules/benchmark/lib/commons-compress-1.2.jar"/>
<classpathentry kind="lib" path="modules/benchmark/lib/commons-digester-1.7.jar"/>
<classpathentry kind="lib" path="modules/benchmark/lib/commons-logging-1.0.4.jar"/>
<classpathentry kind="lib" path="modules/benchmark/lib/xercesImpl-2.9.1-patched-XERCESJ-1257.jar"/>
@@ -131,7 +131,7 @@
<classpathentry kind="lib" path="solr/contrib/extraction/lib/bcmail-jdk15-1.45.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/bcprov-jdk15-1.45.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/boilerpipe-1.1.0.jar"/>
- <classpathentry kind="lib" path="solr/contrib/extraction/lib/commons-compress-1.1.jar"/>
+ <classpathentry kind="lib" path="solr/contrib/extraction/lib/commons-compress-1.2.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/dom4j-1.6.1.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/fontbox-1.3.1.jar"/>
<classpathentry kind="lib" path="solr/contrib/extraction/lib/jempbox-1.3.1.jar"/>
diff --git a/dev-tools/maven/pom.xml.template b/dev-tools/maven/pom.xml.template
index 17a00eb837f..e58438d1e8f 100644
--- a/dev-tools/maven/pom.xml.template
+++ b/dev-tools/maven/pom.xml.template
@@ -213,7 +213,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
- <version>1.1</version>
+ <version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
diff --git a/modules/benchmark/CHANGES.txt b/modules/benchmark/CHANGES.txt
index 8920d95b269..14898277551 100644
--- a/modules/benchmark/CHANGES.txt
+++ b/modules/benchmark/CHANGES.txt
@@ -5,6 +5,10 @@ The Benchmark contrib package contains code for benchmarking Lucene in a variety
For more information on past and future Lucene versions, please see:
http://s.apache.org/luceneversions
+09/25/2011
+ LUCENE-3457: Upgrade commons-compress to 1.2 (and undo LUCENE-2980's workaround).
+ (Doron Cohen)
+
05/25/2011
LUCENE-3137: ExtractReuters supports out-dir param suffixed by a slash. (Doron Cohen)
diff --git a/modules/benchmark/lib/commons-compress-1.1.jar b/modules/benchmark/lib/commons-compress-1.1.jar
deleted file mode 100644
index c47e3962b1c..00000000000
--- a/modules/benchmark/lib/commons-compress-1.1.jar
+++ /dev/null
@@ -1,2 +0,0 @@
-AnyObjectId[51baf91a2df10184a8cca5cb43f11418576743a1] was removed in git history.
-Apache SVN contains full history.
\ No newline at end of file
diff --git a/modules/benchmark/lib/commons-compress-1.2.jar b/modules/benchmark/lib/commons-compress-1.2.jar
new file mode 100644
index 00000000000..7a6af362823
--- /dev/null
+++ b/modules/benchmark/lib/commons-compress-1.2.jar
@@ -0,0 +1,2 @@
+AnyObjectId[61753909c3f32306bf60d09e5345d47058ba2122] was removed in git history.
+Apache SVN contains full history.
\ No newline at end of file
diff --git a/modules/benchmark/lib/commons-compress-NOTICE.txt b/modules/benchmark/lib/commons-compress-NOTICE.txt
index a5331f08e7a..1a1f52c9016 100644
--- a/modules/benchmark/lib/commons-compress-NOTICE.txt
+++ b/modules/benchmark/lib/commons-compress-NOTICE.txt
@@ -1,5 +1,5 @@
Apache Commons Compress
-Copyright 2002-2010 The Apache Software Foundation
+Copyright 2002-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
diff --git a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
index b6f8d674d54..f760d07bb5b 100644
--- a/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
+++ b/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
@@ -54,7 +54,7 @@ public class StreamUtils {
}
private InputStream inputStream(InputStream in) throws IOException {
try {
- return csfType==null ? in : closableCompressorInputStream(this, in);
+ return csfType==null ? in : new CompressorStreamFactory().createCompressorInputStream(csfType, in);
} catch (CompressorException e) {
IOException ioe = new IOException(e.getMessage());
ioe.initCause(e);
@@ -80,7 +80,6 @@ public class StreamUtils {
extensionToType.put(".gzip", Type.GZIP);
}
-
/**
* Returns an {@link InputStream} over the requested file. This method
* attempts to identify the appropriate {@link InputStream} instance to return
@@ -105,32 +104,6 @@ public class StreamUtils {
return type==null ? Type.PLAIN : type;
}
- /**
- * Wrap the compressor input stream so that calling close will also close
- * the underlying stream - workaround for CommonsCompress bug (COMPRESS-127).
- */
- private static InputStream closableCompressorInputStream(Type type, final InputStream is) throws CompressorException {
- final InputStream delegee = new CompressorStreamFactory().createCompressorInputStream(type.csfType, is);
- if (!Type.GZIP.equals(type)) {
- return delegee; //compressor bug affects only gzip
- }
- return new InputStream() {
- @Override public int read() throws IOException { return delegee.read(); }
- @Override public int read(byte[] b) throws IOException { return delegee.read(b); }
- @Override public int available() throws IOException { return delegee.available(); }
- @Override public synchronized void mark(int readlimit) { delegee.mark(readlimit); }
- @Override public boolean markSupported() { return delegee.markSupported(); }
- @Override public int read(byte[] b, int off, int len) throws IOException { return delegee.read(b, off, len); }
- @Override public synchronized void reset() throws IOException { delegee.reset(); }
- @Override public long skip(long n) throws IOException { return delegee.skip(n); }
- @Override
- public void close() throws IOException {
- delegee.close();
- is.close();
- }
- };
- }
-
/**
* Returns an {@link OutputStream} over the requested file, identifying
* the appropriate {@link OutputStream} instance similar to {@link #inputStream(File)}.
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 023ad6a7f75..3c53e22ec21 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -390,6 +390,8 @@ Bug Fixes
move BufferingRequestProcessor from solr-core tests to test-framework so that
the Solr Cell module can use it. (janhoy, Steve Rowe)
+* LUCENE-3457: Upgrade commons-compress to 1.2 (Doron Cohen)
+
================== 3.4.0 ==================
Upgrading from Solr 3.3
diff --git a/solr/contrib/extraction/lib/commons-compress-1.1.jar b/solr/contrib/extraction/lib/commons-compress-1.1.jar
deleted file mode 100644
index c47e3962b1c..00000000000
--- a/solr/contrib/extraction/lib/commons-compress-1.1.jar
+++ /dev/null
@@ -1,2 +0,0 @@
-AnyObjectId[51baf91a2df10184a8cca5cb43f11418576743a1] was removed in git history.
-Apache SVN contains full history.
\ No newline at end of file
diff --git a/solr/contrib/extraction/lib/commons-compress-1.2.jar b/solr/contrib/extraction/lib/commons-compress-1.2.jar
new file mode 100755
index 00000000000..7a6af362823
--- /dev/null
+++ b/solr/contrib/extraction/lib/commons-compress-1.2.jar
@@ -0,0 +1,2 @@
+AnyObjectId[61753909c3f32306bf60d09e5345d47058ba2122] was removed in git history.
+Apache SVN contains full history.
\ No newline at end of file
diff --git a/solr/contrib/extraction/lib/commons-compress-NOTICE.txt b/solr/contrib/extraction/lib/commons-compress-NOTICE.txt
index a5331f08e7a..1a1f52c9016 100644
--- a/solr/contrib/extraction/lib/commons-compress-NOTICE.txt
+++ b/solr/contrib/extraction/lib/commons-compress-NOTICE.txt
@@ -1,5 +1,5 @@
Apache Commons Compress
-Copyright 2002-2010 The Apache Software Foundation
+Copyright 2002-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).