You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2008/10/08 12:38:14 UTC
svn commit: r702800 -
/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java
Author: rickmcguire
Date: Wed Oct 8 03:38:14 2008
New Revision: 702800
URL: http://svn.apache.org/viewvc?rev=702800&view=rev
Log:
GERONIMO-4342 MimeMessage#writeTo doesn't flush the encoder stream
Patch provided by Andreas Veithen
Modified:
geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java
Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java?rev=702800&r1=702799&r2=702800&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java (original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java Wed Oct 8 03:38:14 2008
@@ -1162,7 +1162,9 @@
// if the modfied flag, we don't have current content, so the data handler needs to
// take care of writing this data out.
if (modified) {
- dh.writeTo(MimeUtility.encode(out, getEncoding()));
+ OutputStream encoderStream = MimeUtility.encode(out, getEncoding());
+ dh.writeTo(encoderStream);
+ encoderStream.flush();
} else {
// if we have content directly, we can write this out now.
if (content != null) {