Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 575D59FEF for ; Tue, 7 Feb 2012 12:14:32 +0000 (UTC) Received: (qmail 6519 invoked by uid 500); 7 Feb 2012 12:14:32 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 6473 invoked by uid 500); 7 Feb 2012 12:14:31 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 6461 invoked by uid 99); 7 Feb 2012 12:14:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 12:14:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 12:14:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 090AD23888E7 for ; Tue, 7 Feb 2012 12:14:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1241438 - /httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java Date: Tue, 07 Feb 2012 12:14:07 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120207121408.090AD23888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olegk Date: Tue Feb 7 12:14:07 2012 New Revision: 1241438 URL: http://svn.apache.org/viewvc?rev=1241438&view=rev Log: minor optimization in IdentityDecoder Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java?rev=1241438&r1=1241437&r2=1241438&view=diff ============================================================================== --- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java (original) +++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java Tue Feb 7 12:14:07 2012 @@ -117,8 +117,8 @@ public class IdentityDecoder extends Abs " > " + dst.size() + "]"); } bytesRead = dst.transferFrom(this.channel, position, count); - if (bytesRead == 0) { - bytesRead = buffer.fill(this.channel); + if (count > 0 && bytesRead == 0) { + bytesRead = this.buffer.fill(this.channel); } } else { bytesRead = -1;