You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2008/09/02 09:31:52 UTC

svn commit: r691133 - /servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/NormalizedMessageImpl.java

Author: ffang
Date: Tue Sep  2 00:31:52 2008
New Revision: 691133

URL: http://svn.apache.org/viewvc?rev=691133&view=rev
Log:
[SM-1526]revert previous change

Modified:
    servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/NormalizedMessageImpl.java

Modified: servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/NormalizedMessageImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/NormalizedMessageImpl.java?rev=691133&r1=691132&r2=691133&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/NormalizedMessageImpl.java (original)
+++ servicemix/smx3/branches/servicemix-3.2/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/NormalizedMessageImpl.java Tue Sep  2 00:31:52 2008
@@ -21,7 +21,6 @@
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
-import java.io.Serializable;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -309,10 +308,7 @@
         try {
             convertAttachments();
             out.writeObject(attachments);
-            //since we can't guarantee all properties is Serializable, so only write the 
-            //properties which is serializable to the external to avoid NotSerializableException
-            Map serialiableProperties = getSeriableProperties(properties);
-            out.writeObject(serialiableProperties);
+            out.writeObject(properties);
             String src = TRANSFORMER.toString(content);
             out.writeObject(src);
             // We have read the source
@@ -326,20 +322,7 @@
         }
     }
 
-    private Map getSeriableProperties(Map originalProperties) {
-        if (originalProperties == null) {
-            return originalProperties;
-        }
-        Map ret = new HashMap();
-        
-        for (Object key : originalProperties.keySet()) {
-            if (originalProperties.get(key) instanceof Serializable) {
-                ret.put(key, originalProperties.get(key));
-            }
-        }
-        return ret;
-    }
-
+    
     private void convertAttachments() throws IOException {
         if (attachments != null) {
             Map newAttachments = createAttachmentsMap();