You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/08/16 18:56:17 UTC

[GitHub] merlimat commented on a change in pull request #1414: Ensure BufferedChannel instance is properly closed

merlimat commented on a change in pull request #1414: Ensure BufferedChannel instance is properly closed
URL: https://github.com/apache/bookkeeper/pull/1414#discussion_r210705866
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
 ##########
 @@ -1140,24 +1140,15 @@ public void shutdown() {
         entryLoggerAllocator.stop();
     }
 
-    static void closeFileChannel(BufferedChannelBase channel) throws IOException {
-        if (null == channel) {
-            return;
-        }
-
-        FileChannel fileChannel = channel.getFileChannel();
-        if (null != fileChannel) {
-            fileChannel.close();
+    static void closeFileChannel(BufferedChannel channel) throws IOException {
 
 Review comment:
   Make sense. These 2 methods were doing more work before but they have no need to be there now. Changed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services