geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r668788 - /geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMessage.java
Date Tue, 17 Jun 2008 18:41:29 GMT
Author: rickmcguire
Date: Tue Jun 17 11:41:28 2008
New Revision: 668788

URL: http://svn.apache.org/viewvc?rev=668788&view=rev
Log:
GERONIMO-4122 MimeMessage copy constructor is not copying/initizing the message flags.


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=668788&r1=668787&r2=668788&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
Tue Jun 17 11:41:28 2008
@@ -165,14 +165,16 @@
      */
     public MimeMessage(MimeMessage message) throws MessagingException {
         super(message.session);
+        // get a copy of the source message flags 
+        flags = message.getFlags(); 
         // this is somewhat difficult to do.  There's a lot of data in both the superclass
and this
         // class that needs to undergo a "deep cloning" operation.  These operations don't
really exist
         // on the objects in question, so the only solution I can come up with is to serialize
the
         // message data of the source object using the write() method, then reparse the data
in this
         // object.  I've not found a lot of uses for this particular constructor, so perhaps
that's not
         // really all that bad of a solution.
-
-        // serialized this out to an in-memory stream.
+        
+        // serialize this out to an in-memory stream.
         ByteArrayOutputStream copy = new ByteArrayOutputStream();
 
         try {



Mime
View raw message