timveil opened a new issue, #12129:
URL: https://github.com/apache/pinot/issues/12129

   found three possible instances of a `Channel` being opened but not properly 
closed.   this could lead to resource leaks.
   
   for example, this...
   
   ```java
   try (RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r")) {
     ...
     randomAccessFile.getChannel().read(duplicate, srcOffset);
   }
   ```
   
   should really be this...
   ```java
   try (RandomAccessFile randomAccessFile = new RandomAccessFile(file, "r");
       FileChannel channel = randomAccessFile.getChannel()) {
     ...
     channel.read(duplicate, srcOffset);
   }
   ```


-- 
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: commits-unsubscr...@pinot.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to