You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2008/09/03 06:07:04 UTC
svn commit: r691508 -
/cxf/branches/2.0.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
Author: ffang
Date: Tue Sep 2 21:07:04 2008
New Revision: 691508
URL: http://svn.apache.org/viewvc?rev=691508&view=rev
Log:
[CXF-1779]exclude Map or Collection property as well which entry may not be serializable
Modified:
cxf/branches/2.0.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
Modified: cxf/branches/2.0.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java?rev=691508&r1=691507&r2=691508&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java (original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java Tue Sep 2 21:07:04 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());
}
}