richardstartin commented on a change in pull request #8143:
URL: https://github.com/apache/pinot/pull/8143#discussion_r800534280



##########
File path: 
pinot-plugins/pinot-input-format/pinot-thrift/src/test/java/org/apache/pinot/plugin/inputformat/thrift/ThriftRecordExtractorTest.java
##########
@@ -130,7 +131,12 @@ protected void createInputFile()
     }
 
     BufferedOutputStream bufferedOut = new BufferedOutputStream(new 
FileOutputStream(_tempFile));
-    TBinaryProtocol binaryOut = new TBinaryProtocol(new 
TIOStreamTransport(bufferedOut));
+    TBinaryProtocol binaryOut = null;
+    try {
+      binaryOut = new TBinaryProtocol(new TIOStreamTransport(bufferedOut));
+    } catch (TTransportException e) {
+      throw new IOException(e);
+    }

Review comment:
       If you feel like it, this code could also be modernised to use try with 
resources while you're at it.




-- 
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: [email protected]

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to