DomGarguilo commented on PR #6377:
URL: https://github.com/apache/accumulo/pull/6377#issuecomment-4483197590

   try-with-resources wont work here since we need to return the stream but 
what if we used a try-finally block instead? And add a new boolean to track 
whether the stream was successfully returned or not. Then in the finally block 
if it was not successfully returned that means we need to close it. That way in 
all failure cases, even any that we might not expect here, we can properly 
close the stream and dont need to duplicate the close logic.


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

Reply via email to