mirror of https://github.com/apache/lucene.git
SOLR-11879: avoid EOFException when content is send without a payload
This commit is contained in:
parent
27ef653064
commit
586aa65110
|
@ -16,6 +16,13 @@
|
|||
*/
|
||||
package org.apache.solr.handler.loader;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec;
|
||||
import org.apache.solr.client.solrj.request.UpdateRequest;
|
||||
import org.apache.solr.common.SolrException;
|
||||
|
@ -32,13 +39,6 @@ import org.apache.solr.update.AddUpdateCommand;
|
|||
import org.apache.solr.update.DeleteUpdateCommand;
|
||||
import org.apache.solr.update.processor.UpdateRequestProcessor;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Update handler which uses the JavaBin format
|
||||
*
|
||||
|
@ -103,6 +103,7 @@ public class JavabinLoader extends ContentStreamLoader {
|
|||
}
|
||||
};
|
||||
FastInputStream in = FastInputStream.wrap(stream);
|
||||
if (in.peek() == -1) return;
|
||||
for (; ; ) {
|
||||
try {
|
||||
update = new JavaBinUpdateRequestCodec().unmarshal(in, handler);
|
||||
|
|
Loading…
Reference in New Issue