LUCENE-5599: HttpClientBase did not properly delegate to wrapped InputStream

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1587930 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2014-04-16 14:41:21 +00:00
parent 9804d3f853
commit 3b92bf8f66
2 changed files with 5 additions and 2 deletions

View File

@ -84,6 +84,9 @@ Optimizations
* LUCENE-5603: hunspell stemmer more efficiently strips prefixes * LUCENE-5603: hunspell stemmer more efficiently strips prefixes
and suffixes. (Robert Muir) and suffixes. (Robert Muir)
* LUCENE-5599: HttpReplicator did not properly delegate bulk read() to wrapped
InputStream. (Christoph Kaser via Shai Erera)
======================= Lucene 4.8.0 ======================= ======================= Lucene 4.8.0 =======================
System Requirements System Requirements

View File

@ -221,13 +221,13 @@ public abstract class HttpClientBase implements Closeable {
} }
@Override @Override
public int read(byte[] b) throws IOException { public int read(byte[] b) throws IOException {
final int res = super.read(b); final int res = in.read(b);
consume(res); consume(res);
return res; return res;
} }
@Override @Override
public int read(byte[] b, int off, int len) throws IOException { public int read(byte[] b, int off, int len) throws IOException {
final int res = super.read(b, off, len); final int res = in.read(b, off, len);
consume(res); consume(res);
return res; return res;
} }