lidavidm commented on a change in pull request #9354:
URL: https://github.com/apache/arrow/pull/9354#discussion_r567429952



##########
File path: 
java/flight/flight-core/src/main/java/org/apache/arrow/flight/grpc/AddWritableBuffer.java
##########
@@ -88,11 +87,8 @@
    * @param buf The buffer to add.
    * @param stream The Candidate OutputStream to add to.
    * @return True if added. False if not possible.
-   * @throws IOException on error
    */
-  public static boolean add(ByteBuf buf, OutputStream stream) throws 
IOException {
-    buf.readBytes(stream, buf.readableBytes());

Review comment:
       Yes - `readBytes` increments the reader index and so the subsequent 
getBytes call wouldn't do anything.
   
   
https://github.com/apache/arrow/blob/6b85f6eba6d8403dbd549212fbc86f0e8ee192d0/java/flight/flight-core/src/main/java/org/apache/arrow/flight/ArrowMessage.java#L441




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to