highluck commented on a change in pull request #9105:
URL: https://github.com/apache/kafka/pull/9105#discussion_r464215307



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java
##########
@@ -197,8 +197,8 @@ synchronized boolean lock(final TaskId taskId) throws 
IOException {
 
         final FileChannel channel;
 
-        try {
-            channel = getOrCreateFileChannel(taskId, lockFile.toPath());
+        try (final FileChannel fileChannel = getOrCreateFileChannel(taskId, 
lockFile.toPath())) {

Review comment:
       thanks for review 
   It works, but it seems strange.
   The code was updated




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to