activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r1517230 - /activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java
Date Sun, 25 Aug 2013 07:22:34 GMT
Author: rajdavies
Date: Sun Aug 25 07:22:34 2013
New Revision: 1517230

URL: http://svn.apache.org/r1517230
Log:
check connection isn't null before asking for it's BlobTransferPolicy

Modified:
    activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java

Modified: activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java?rev=1517230&r1=1517229&r2=1517230&view=diff
==============================================================================
--- activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java
(original)
+++ activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageTransformation.java
Sun Aug 25 07:22:34 2013
@@ -19,34 +19,10 @@ package org.apache.activemq;
 import java.net.MalformedURLException;
 import java.util.Enumeration;
 
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
+import javax.jms.*;
 import javax.jms.Message;
-import javax.jms.MessageEOFException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.StreamMessage;
-import javax.jms.TemporaryQueue;
-import javax.jms.TemporaryTopic;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
 import org.apache.activemq.blob.BlobDownloader;
-import org.apache.activemq.blob.BlobUploader;
-import org.apache.activemq.command.ActiveMQBlobMessage;
-import org.apache.activemq.command.ActiveMQBytesMessage;
-import org.apache.activemq.command.ActiveMQDestination;
-import org.apache.activemq.command.ActiveMQMapMessage;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.ActiveMQObjectMessage;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQStreamMessage;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.command.ActiveMQTempTopic;
-import org.apache.activemq.command.ActiveMQTextMessage;
-import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.command.*;
 
 /**
  * A helper class for converting normal JMS interfaces into ActiveMQ specific
@@ -173,7 +149,9 @@ public final class ActiveMQMessageTransf
             	BlobMessage blobMessage = (BlobMessage)message;
             	ActiveMQBlobMessage msg = new ActiveMQBlobMessage();
             	msg.setConnection(connection);
-            	msg.setBlobDownloader(new BlobDownloader(connection.getBlobTransferPolicy()));
+                if (connection != null){
+            	    msg.setBlobDownloader(new BlobDownloader(connection.getBlobTransferPolicy()));
+                }
             	try {
 					msg.setURL(blobMessage.getURL());
 				} catch (MalformedURLException e) {



Mime
View raw message