Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 12289 invoked from network); 8 Oct 2009 13:04:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Oct 2009 13:04:34 -0000 Received: (qmail 53373 invoked by uid 500); 8 Oct 2009 13:04:34 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 53327 invoked by uid 500); 8 Oct 2009 13:04:33 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 53318 invoked by uid 99); 8 Oct 2009 13:04:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 13:04:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Thu, 08 Oct 2009 13:04:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 364C823888DB; Thu, 8 Oct 2009 13:04:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r823159 - /harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java Date: Thu, 08 Oct 2009 13:04:10 -0000 To: commits@harmony.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091008130410.364C823888DB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tellison Date: Thu Oct 8 13:04:09 2009 New Revision: 823159 URL: http://svn.apache.org/viewvc?rev=823159&view=rev Log: Revert changes from r823144. Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java?rev=823159&r1=823158&r2=823159&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java (original) +++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java Thu Oct 8 13:04:09 2009 @@ -382,11 +382,11 @@ @Override public int read() throws IOException { - int count = read(singleByteBuf, 0, 1); - if (count == 1) { - return singleByteBuf[0] & 0xFF; + if (read(singleByteBuf, 0, 1) == 1) { + return singleByteBuf[0] & 0XFF; + } else { + return -1; } - return count; } @Override @@ -399,14 +399,16 @@ int count = mSharedRaf.read(b, off, len); if (count > 0) { mOffset += count; + return count; + } else { + return -1; } - return count; } } @Override public long skip(long n) throws IOException { - if (n > mLength - mOffset) { + if (mOffset + n > mLength) { n = mLength - mOffset; } mOffset += n;