You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by di...@apache.org on 2007/06/21 16:28:11 UTC

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

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);