lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1066889 - /lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
Date Thu, 03 Feb 2011 17:41:54 GMT
Author: uschindler
Date: Thu Feb  3 17:41:53 2011
New Revision: 1066889

URL: http://svn.apache.org/viewvc?rev=1066889&view=rev
Log:
Fix issue in CommonsHttpSolrServer where a Reader is copied to an OutputStream using default
encoding

Modified:
    lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java

Modified: lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java?rev=1066889&r1=1066888&r2=1066889&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
(original)
+++ lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
Thu Feb  3 17:41:53 2011
@@ -20,7 +20,6 @@ package org.apache.solr.client.solrj.imp
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.Reader;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
@@ -335,11 +334,11 @@ public class CommonsHttpSolrServer exten
                     @Override
                     protected void sendData(OutputStream out)
                         throws IOException {
-                      Reader reader = c.getReader();
+                      InputStream in = c.getStream();
                       try {
-                        IOUtils.copy(reader, out);
+                        IOUtils.copy(in, out);
                       } finally {
-                        reader.close();
+                        in.close();
                       }
                     }
                   });



Mime
View raw message