You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/06/30 12:02:18 UTC

svn commit: r418223 - /incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/components/util/BinaryFileMarshaler.java

Author: gnodet
Date: Fri Jun 30 03:02:16 2006
New Revision: 418223

URL: http://svn.apache.org/viewvc?rev=418223&view=rev
Log:
Fix the BinaryFileMarshaler which does not test for the attachment to exist in the message

Modified:
    incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/components/util/BinaryFileMarshaler.java

Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/components/util/BinaryFileMarshaler.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/components/util/BinaryFileMarshaler.java?rev=418223&r1=418222&r2=418223&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/components/util/BinaryFileMarshaler.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/components/util/BinaryFileMarshaler.java Fri Jun 30 03:02:16 2006
@@ -67,7 +67,7 @@
 
 	public void writeMessage(MessageExchange exchange, NormalizedMessage message, OutputStream out, String path) throws IOException, JBIException {
 		DataHandler handler = message.getAttachment(attachment);
-		if (attachment == null) {
+		if (handler == null) {
 			throw new MessagingException("Could not find attachment: " + attachment);
 		}
 		InputStream is = handler.getInputStream();