mirror of https://github.com/apache/lucene.git
SOLR-1053 -- IndexOutOfBoundsException in SolrWriter.getResourceAsString when size of data-config.xml is a multiple of 1024 bytes
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@751696 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8fddbedebc
commit
15a9d6b543
|
@ -161,6 +161,10 @@ Bug Fixes
|
|||
21.SOLR-1042: Fix memory leak in DIH by making TemplateString non-static member in VariableResolverImpl
|
||||
(Ryuuichi Kumai via shalin)
|
||||
|
||||
22.SOLR-1053: IndexOutOfBoundsException in SolrWriter.getResourceAsString when size of data-config.xml is a
|
||||
multiple of 1024 bytes.
|
||||
(Herb Jiang via shalin)
|
||||
|
||||
Documentation
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -192,11 +192,8 @@ public class SolrWriter {
|
|||
byte[] buf = new byte[1024];
|
||||
int sz = 0;
|
||||
try {
|
||||
while (true) {
|
||||
sz = in.read(buf);
|
||||
while ((sz = in.read(buf)) != -1) {
|
||||
baos.write(buf, 0, sz);
|
||||
if (sz < buf.length)
|
||||
break;
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue