You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/07 20:06:40 UTC

[GitHub] [arrow] lwhite1 commented on a diff in pull request #14346: ARROW-17962: [Java] Remove unused schema creation from try with resources

lwhite1 commented on code in PR #14346:
URL: https://github.com/apache/arrow/pull/14346#discussion_r990464928


##########
java/c/src/test/java/org/apache/arrow/c/RoundtripTest.java:
##########
@@ -673,8 +673,7 @@ public void testTable() {
           Table table = new Table(vsr);
       ) {
         // Producer creates structures from existing memory pointers
-        try (ArrowSchema arrowSchema = ArrowSchema.wrap(consumerArrowSchema.memoryAddress());
-            ArrowArray arrowArray = ArrowArray.wrap(consumerArrowArray.memoryAddress())) {
+        try (ArrowArray arrowArray = ArrowArray.wrap(consumerArrowArray.memoryAddress())) {

Review Comment:
   I'm not sure, but arrowSchema was unused. My assumption was that it was being closed at the end of the try, and also by 'something else'. It's really hard to tell how to fix it since it works in my environment, but given that the variable was unused, I thought it worth a try. 



-- 
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: github-unsubscribe@arrow.apache.org

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