harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r823111 - /harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
Date Thu, 08 Oct 2009 10:12:44 GMT
Author: tellison
Date: Thu Oct  8 10:12:43 2009
New Revision: 823111

URL: http://svn.apache.org/viewvc?rev=823111&view=rev
Log:
Code tidy-up.
 - add missing override annotations
 - change if statement body to block
 - remove unused import

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=823111&r1=823110&r2=823111&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 10:12:43 2009
@@ -24,7 +24,6 @@
 import java.io.RandomAccessFile;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.Collections;
 import java.util.Enumeration;
 import java.util.LinkedHashMap;
 import java.util.Iterator;
@@ -381,6 +380,7 @@
             return (mOffset < mLength ? 1 : 0);
         }
 
+        @Override
         public int read() throws IOException {
             if (read(singleByteBuf, 0, 1) == 1) {
                 return singleByteBuf[0] & 0XFF;
@@ -389,10 +389,13 @@
             }
         }
 
+        @Override
         public int read(byte[] b, int off, int len) throws IOException {
             synchronized (mSharedRaf) {
                 mSharedRaf.seek(mOffset);
-                if (mOffset + len > mLength) len = (int) (mLength - mOffset);
+                if (mOffset + len > mLength) {
+                    len = (int) (mLength - mOffset);
+                }
                 int count = mSharedRaf.read(b, off, len);
                 if (count > 0) {
                     mOffset += count;



Mime
View raw message