You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by do...@apache.org on 2011/09/25 20:15:18 UTC

svn commit: r1175475 - in /lucene/dev/trunk: dev-tools/eclipse/ dev-tools/maven/ modules/benchmark/ modules/benchmark/lib/ modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/ solr/ solr/contrib/extraction/lib/

Author: doronc
Date: Sun Sep 25 18:15:18 2011
New Revision: 1175475

URL: http://svn.apache.org/viewvc?rev=1175475&view=rev
Log:
LUCENE-3457: Upgrade commons-compress to 1.2

Added:
    lucene/dev/trunk/modules/benchmark/lib/commons-compress-1.2.jar   (with props)
    lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-1.2.jar   (with props)
Removed:
    lucene/dev/trunk/modules/benchmark/lib/commons-compress-1.1.jar
    lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-1.1.jar
Modified:
    lucene/dev/trunk/dev-tools/eclipse/dot.classpath
    lucene/dev/trunk/dev-tools/maven/pom.xml.template
    lucene/dev/trunk/modules/benchmark/CHANGES.txt
    lucene/dev/trunk/modules/benchmark/lib/commons-compress-NOTICE.txt
    lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-NOTICE.txt

Modified: lucene/dev/trunk/dev-tools/eclipse/dot.classpath
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/eclipse/dot.classpath?rev=1175475&r1=1175474&r2=1175475&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/eclipse/dot.classpath (original)
+++ lucene/dev/trunk/dev-tools/eclipse/dot.classpath Sun Sep 25 18:15:18 2011
@@ -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"/>

Modified: lucene/dev/trunk/dev-tools/maven/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/maven/pom.xml.template?rev=1175475&r1=1175474&r2=1175475&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/maven/pom.xml.template (original)
+++ lucene/dev/trunk/dev-tools/maven/pom.xml.template Sun Sep 25 18:15:18 2011
@@ -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>

Modified: lucene/dev/trunk/modules/benchmark/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/CHANGES.txt?rev=1175475&r1=1175474&r2=1175475&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/CHANGES.txt (original)
+++ lucene/dev/trunk/modules/benchmark/CHANGES.txt Sun Sep 25 18:15:18 2011
@@ -5,6 +5,10 @@ The Benchmark contrib package contains c
 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)
 

Added: lucene/dev/trunk/modules/benchmark/lib/commons-compress-1.2.jar
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/lib/commons-compress-1.2.jar?rev=1175475&view=auto
==============================================================================
Binary file - no diff available.

Modified: lucene/dev/trunk/modules/benchmark/lib/commons-compress-NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/lib/commons-compress-NOTICE.txt?rev=1175475&r1=1175474&r2=1175475&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/lib/commons-compress-NOTICE.txt (original)
+++ lucene/dev/trunk/modules/benchmark/lib/commons-compress-NOTICE.txt Sun Sep 25 18:15:18 2011
@@ -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/).

Modified: lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java?rev=1175475&r1=1175474&r2=1175475&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java (original)
+++ lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/StreamUtils.java Sun Sep 25 18:15:18 2011
@@ -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
@@ -106,32 +105,6 @@ public class StreamUtils {
 	}
   
   /**
-   * 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)}.
    */

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1175475&r1=1175474&r2=1175475&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sun Sep 25 18:15:18 2011
@@ -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

Added: lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-1.2.jar
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-1.2.jar?rev=1175475&view=auto
==============================================================================
Binary file - no diff available.

Modified: lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-NOTICE.txt?rev=1175475&r1=1175474&r2=1175475&view=diff
==============================================================================
--- lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-NOTICE.txt (original)
+++ lucene/dev/trunk/solr/contrib/extraction/lib/commons-compress-NOTICE.txt Sun Sep 25 18:15:18 2011
@@ -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/).