servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r429263 - /incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/MessageUtil.java
Date Mon, 07 Aug 2006 07:20:09 GMT
Author: gnodet
Date: Mon Aug  7 00:20:09 2006
New Revision: 429263

URL: http://svn.apache.org/viewvc?rev=429263&view=rev
Log:
SM-516: MessageUtil should support empty content when copying messages

Modified:
    incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/MessageUtil.java

Modified: incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/MessageUtil.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/MessageUtil.java?rev=429263&r1=429262&r2=429263&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/MessageUtil.java
(original)
+++ incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/MessageUtil.java
Mon Aug  7 00:20:09 2006
@@ -131,7 +131,10 @@
         private Map attachments = new HashMap();
         
         public NormalizedMessageImpl(NormalizedMessage message) throws Exception {
-            this.content = new StringSource(new SourceTransformer().contentToString(message));
+            String str = new SourceTransformer().contentToString(message);
+            if (str != null) {
+                this.content = new StringSource(str);
+            }
             for (Iterator it = message.getPropertyNames().iterator(); it.hasNext();) {
                 String name = (String) it.next();
                 this.properties.put(name, message.getProperty(name));



Mime
View raw message