HoustonPutman commented on code in PR #3341:
URL: https://github.com/apache/solr/pull/3341#discussion_r2070708142


##########
solr/solrj/src/java/org/apache/solr/common/util/ResumableInputStream.java:
##########
@@ -84,6 +83,34 @@ public int read(boolean isRetry) throws IOException {
     return val;
   }
 
+  @Override
+  public int read(byte[] b, int off, int len) throws IOException {
+    return read(b, off, len, false);
+  }
+
+  public int read(byte[] b, int off, int len, boolean isRetry) throws 
IOException {
+    if (delegate == null) {
+      delegate = nextInputStreamSupplier.apply(bytesRead);
+    }
+    int readLen;
+    try {
+      readLen = delegate.read(b, off, len);
+      if (len >= 0) {

Review Comment:
   Ahh the reason it's not a big deal is that we never call read() after 
getting a -1, so the `byteCount` isn't really used. So it's wrong, but our test 
(and most usages of InputStream) didn't see any issue, because we follow the 
contract of InputStream.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to