diff --git a/lib/java/src/main/java/org/apache/thrift/TNonblockingMultiFetchClient.java b/lib/java/src/main/java/org/apache/thrift/TNonblockingMultiFetchClient.java
index 034cc85..ffe4fa7 100644
--- a/lib/java/src/main/java/org/apache/thrift/TNonblockingMultiFetchClient.java
+++ b/lib/java/src/main/java/org/apache/thrift/TNonblockingMultiFetchClient.java
@@ -280,16 +280,14 @@
             }
           }
 
-          if (selKey.isValid() && selKey.isWritable()) {
-            if (sendBuf[index].hasRemaining()) {
-              // if this socket throws an exception, print error msg and
-              // skip it.
-              try {
-                SocketChannel sChannel = (SocketChannel) selKey.channel();
-                sChannel.write(sendBuf[index]);
-              } catch (Exception e) {
-                LOGGER.error("Socket {} writes to server {} error", index, servers.get(index), e);
-              }
+          if (selKey.isValid() && selKey.isWritable() && sendBuf[index].hasRemaining()) {
+            // if this socket throws an exception, print error msg and
+            // skip it.
+            try {
+              SocketChannel sChannel = (SocketChannel) selKey.channel();
+              sChannel.write(sendBuf[index]);
+            } catch (Exception e) {
+              LOGGER.error("Socket {} writes to server {} error", index, servers.get(index), e);
             }
           }
 
diff --git a/lib/java/src/main/java/org/apache/thrift/server/AbstractNonblockingServer.java b/lib/java/src/main/java/org/apache/thrift/server/AbstractNonblockingServer.java
index 44341d9..01b15e8 100644
--- a/lib/java/src/main/java/org/apache/thrift/server/AbstractNonblockingServer.java
+++ b/lib/java/src/main/java/org/apache/thrift/server/AbstractNonblockingServer.java
@@ -190,10 +190,8 @@
       }
 
       // if the buffer's frame read is complete, invoke the method.
-      if (buffer.isFrameFullyRead()) {
-        if (!requestInvoke(buffer)) {
-          cleanupSelectionKey(key);
-        }
+      if (buffer.isFrameFullyRead() && !requestInvoke(buffer)) {
+        cleanupSelectionKey(key);
       }
     }
 
diff --git a/lib/java/src/main/java/org/apache/thrift/transport/TFileTransport.java b/lib/java/src/main/java/org/apache/thrift/transport/TFileTransport.java
index 713d521..b067272 100644
--- a/lib/java/src/main/java/org/apache/thrift/transport/TFileTransport.java
+++ b/lib/java/src/main/java/org/apache/thrift/transport/TFileTransport.java
@@ -447,12 +447,11 @@
     if (!isOpen())
       throw new TTransportException(TTransportException.NOT_OPEN, "Must open before reading");
 
-    if (currentEvent_.getRemaining() == 0) {
-      if (!readEvent()) return (0);
+    if (currentEvent_.getRemaining() == 0 && !readEvent()) {
+      return 0;
     }
 
-    int nread = currentEvent_.emit(buf, off, len);
-    return nread;
+    return currentEvent_.emit(buf, off, len);
   }
 
   public int getNumChunks() throws TTransportException {
