diff --git a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ClobTransformer.java b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ClobTransformer.java index 54c11a9444e..e28c7a2eb20 100644 --- a/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ClobTransformer.java +++ b/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/ClobTransformer.java @@ -71,7 +71,7 @@ public class ClobTransformer extends Transformer { char[] buf = new char[1024]; int len; try { - while ((len = reader.read(buf)) != 0) { + while ((len = reader.read(buf)) != -1) { sb.append(buf, 0, len); } } catch (IOException e) {