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/13 20:11:32 UTC

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

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

 ##########
 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:
   @merlimat I don't see the need of having this static method. I think we can completely get rid of this method and the caller instead of calling "EntryLogger.closeFileChannel(bc)", they can just call "bc.close()"

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