Source:
public <T> void handleChannelResponse(@Nonnull final IMAPResponse serverResponse) { final ImapCommandEntry curEntry = getFirstEntry(); if (curEntry == null) { return; } final ImapRequest currentCmd = curEntry.getRequest(); final Collection<IMAPResponse> responses = curEntry.getResponses(); responses.add(serverResponse); if (serverResponse.isContinuation()) { try { final Object cmdAfterContinue = currentCmd.getNextCommandLineAfterContinuation(serverResponse); if (cmdAfterContinue == null) { return; } sendRequest(cmdAfterContinue); } catch (final ImapAsyncClientException | IndexOutOfBoundsException e) { if (logger.isDebugEnabled()) { logger.debug(INTERNAL_LOG_REC, sessionId, CLIENT_ERROR, e); } requestDoneWithException(new ImapAsyncClientException(ImapAsyncClientException.FailureType.CHANNEL_EXCEPTION, e)); } return; } else if (serverResponse.isTagged()) { if (currentCmd instanceof CompressCommand && serverResponse.isOK()) { final Channel ch = channelRef.get(); final ChannelPipeline pipeline = ch.pipeline(); final JdkZlibDecoder decoder = new JdkZlibDecoder(ZlibWrapper.NONE); final JdkZlibEncoder encoder = new JdkZlibEncoder(ZlibWrapper.NONE, 5); if (pipeline.get(ImapAsyncClient.SSL_HANDLER) == null) { pipeline.addFirst(ZLIB_DECODER, decoder); pipeline.addFirst(ZLIB_ENCODER, encoder); } else { pipeline.addAfter(ImapAsyncClient.SSL_HANDLER, ZLIB_DECODER, decoder); pipeline.addAfter(ImapAsyncClient.SSL_HANDLER, ZLIB_ENCODER, encoder); } } final ImapAsyncResponse doneResponse = new ImapAsyncResponse(responses); removeFirstEntry(); curEntry.getFuture().done(doneResponse); return; } if (logger.isDebugEnabled()) { logger.debug(SERVER_LOG_REC, sessionId, serverResponse.toString()); } }

Target:
public <T> void handleChannelResponse(@Nonnull final IMAPResponse serverResponse) { final ImapCommandEntry curEntry = getFirstEntry(); if (curEntry == null) { return; } final ImapRequest currentCmd = curEntry.getRequest(); final Collection<IMAPResponse> responses = curEntry.getResponses(); responses.add(serverResponse); if (serverResponse.isContinuation()) { try { final Object cmdAfterContinue = currentCmd.getNextCommandLineAfterContinuation(serverResponse); if (cmdAfterContinue == null) { return; } sendRequest(cmdAfterContinue); } catch (final ImapAsyncClientException | IndexOutOfBoundsException e) { if (logger.isDebugEnabled()) { logger.debug(INTERNAL_LOG_REC, sessionId, CLIENT_ERROR, e); } requestDoneWithException(new ImapAsyncClientException(ImapAsyncClientException.FailureType.CHANNEL_EXCEPTION, e)); } return; } else if (serverResponse.isTagged()) { if (currentCmd.isCompressionRequested() && serverResponse.isOK()) { final Channel ch = channelRef.get(); final ChannelPipeline pipeline = ch.pipeline(); final JdkZlibDecoder decoder = new JdkZlibDecoder(ZlibWrapper.NONE); final JdkZlibEncoder encoder = new JdkZlibEncoder(ZlibWrapper.NONE, 5); if (pipeline.get(ImapAsyncClient.SSL_HANDLER) == null) { pipeline.addFirst(ZLIB_DECODER, decoder); pipeline.addFirst(ZLIB_ENCODER, encoder); } else { pipeline.addAfter(ImapAsyncClient.SSL_HANDLER, ZLIB_DECODER, decoder); pipeline.addAfter(ImapAsyncClient.SSL_HANDLER, ZLIB_ENCODER, encoder); } } final ImapAsyncResponse doneResponse = new ImapAsyncResponse(responses); removeFirstEntry(); curEntry.getFuture().done(doneResponse); return; } if (logger.isDebugEnabled()) { logger.debug(SERVER_LOG_REC, sessionId, serverResponse.toString()); } }