liyafan82 commented on a change in pull request #10423:
URL: https://github.com/apache/arrow/pull/10423#discussion_r643606492



##########
File path: 
java/vector/src/test/java/org/apache/arrow/vector/ipc/MessageSerializerTest.java
##########
@@ -197,12 +199,30 @@ public void testSerializeRecordBatchV5() throws 
IOException {
     IpcOption option = new IpcOption(false, MetadataVersion.V5);
     ByteArrayOutputStream out = new ByteArrayOutputStream();
     MessageSerializer.serialize(new WriteChannel(Channels.newChannel(out)), 
batch, option);
+    validityb.close();
+    valuesb.close();
+    batch.close();
+
+    {
+      ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

Review comment:
       It would be nice to wrap this into a 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]


Reply via email to