geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r549494 - /geronimo/specs/branches/geronimo-javamail_1.4_spec-1.0/src/main/java/javax/mail/internet/MimeBodyPart.java
Date Thu, 21 Jun 2007 14:28:11 GMT
Author: dims
Date: Thu Jun 21 07:28:09 2007
New Revision: 549494

URL: http://svn.apache.org/viewvc?view=rev&rev=549494
Log:
Fix for Axis2 build break when using this javamail implementation. Stop when you get no more
bytes from the input stream. Don't explicitly check for -1

Modified:
    geronimo/specs/branches/geronimo-javamail_1.4_spec-1.0/src/main/java/javax/mail/internet/MimeBodyPart.java

Modified: geronimo/specs/branches/geronimo-javamail_1.4_spec-1.0/src/main/java/javax/mail/internet/MimeBodyPart.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/geronimo-javamail_1.4_spec-1.0/src/main/java/javax/mail/internet/MimeBodyPart.java?view=diff&rev=549494&r1=549493&r2=549494
==============================================================================
--- geronimo/specs/branches/geronimo-javamail_1.4_spec-1.0/src/main/java/javax/mail/internet/MimeBodyPart.java
(original)
+++ geronimo/specs/branches/geronimo-javamail_1.4_spec-1.0/src/main/java/javax/mail/internet/MimeBodyPart.java
Thu Jun 21 07:28:09 2007
@@ -82,7 +82,7 @@
         byte[] buffer = new byte[1024];
         int count;
         try {
-            while((count = in.read(buffer, 0, 1024)) != -1)
+            while((count = in.read(buffer, 0, 1024)) > 0)
                 baos.write(buffer, 0, count);
         } catch (IOException e) {
             throw new MessagingException(e.toString(),e);



Mime
View raw message