openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r584415 - /openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java
Date Sat, 13 Oct 2007 15:47:48 GMT
Author: allee8285
Date: Sat Oct 13 08:47:47 2007
New Revision: 584415

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

Modified:
    openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java

Modified: openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java?rev=584415&r1=584414&r2=584415&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java
(original)
+++ openjpa/branches/1.0.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ZipFileMetaDataIterator.java
Sat Oct 13 08:47:47 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