openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r584420 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java
Date Sat, 13 Oct 2007 16:12:41 GMT
Author: allee8285
Date: Sat Oct 13 09:12:35 2007
New Revision: 584420

URL: http://svn.apache.org/viewvc?rev=584420&view=rev
Log:
OPENJPA-402 Complete .class file read in ZipFileMetaDataIterator

Modified:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java?rev=584420&r1=584419&r2=584420&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java
Sat Oct 13 09:12:35 2007
@@ -142,7 +142,12 @@
             content = bout.toByteArray();
         } else {
             content = new byte[(int) size];
-            in.read(content);
+            int offset = 0;
+            int read;
+            while (offset < size &&
+                (read = in.read(content, offset, (int) size - offset)) != -1) {
+                offset += read;
+            }
         }
         in.close();
         return content;



Mime
View raw message