cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r691510 - /cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
Date Wed, 03 Sep 2008 04:10:06 GMT
Author: ffang
Date: Tue Sep  2 21:10:05 2008
New Revision: 691510

URL: http://svn.apache.org/viewvc?rev=691510&view=rev
Log:
[CXF-1779]exclude Map or Collection property as well which entry may not be serializable

Modified:
    cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java

Modified: cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java?rev=691510&r1=691509&r2=691510&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
Tue Sep  2 21:10:05 2008
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Serializable;
+import java.util.Collection;
 import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -114,7 +115,11 @@
                     //copy properties
                     
                     for (Map.Entry<String, Object> ent : inMessage.entrySet()) {
-                        if (ent.getValue() instanceof Serializable) {
+                        //check if value is Serializable, and if value is Map or collection,
+                        //just exclude it since the entry of it may not be Serializable as
well
+                        if (ent.getValue() instanceof Serializable 
+                                && !(ent.getValue() instanceof Map)
+                                && !(ent.getValue() instanceof Collection)) {
                             msg.setProperty(ent.getKey(), ent.getValue());
                         }
                     }



Mime
View raw message