liyafan82 commented on a change in pull request #10423:
URL: https://github.com/apache/arrow/pull/10423#discussion_r643604065
##########
File path:
java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageSerializer.java
##########
@@ -723,8 +723,13 @@ public static MessageMetadataResult
readMessage(ReadChannel in) throws IOExcepti
public static ArrowBuf readMessageBody(ReadChannel in, long bodyLength,
BufferAllocator allocator) throws IOException {
ArrowBuf bodyBuffer = allocator.buffer(bodyLength);
Review comment:
Nice catch!
A more conventional way is to wrap the statements in try-with-resource block?
--
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]