alexeykudinkin commented on code in PR #6995:
URL: https://github.com/apache/hudi/pull/6995#discussion_r998929769


##########
hudi-common/src/test/java/org/apache/hudi/common/functional/TestHoodieLogFormat.java:
##########
@@ -155,6 +155,7 @@ public void testEmptyLog() throws IOException {
     assertEquals(0, writer.getCurrentSize(), "Just created this log, size 
should be 0");
     assertTrue(writer.getLogFile().getFileName().startsWith("."), "Check all 
log files should start with a .");
     assertEquals(1, writer.getLogFile().getLogVersion(), "Version should be 1 
for new log created");
+    writer.close();

Review Comment:
   @nsivabalan for the future reference: it's easier to manage and more 
predictable to use try-with-resources statement:
   
   ```
   try (Closeable c = ...) {
     // Will be closed automatically even in the presence of exceptions
   }
   ```



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