activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1041351 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/command/ActiveMQBlobMessage.java test/java/org/apache/activemq/blob/FTPBlobTest.java
Date Thu, 02 Dec 2010 12:41:58 GMT
Author: gtully
Date: Thu Dec  2 12:41:58 2010
New Revision: 1041351

URL: http://svn.apache.org/viewvc?rev=1041351&view=rev
Log:
apply patch from https://issues.apache.org/jira/browse/AMQ-3067 with thanks and additional
test

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java?rev=1041351&r1=1041350&r2=1041351&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java
Thu Dec  2 12:41:58 2010
@@ -60,6 +60,7 @@ public class ActiveMQBlobMessage extends
         copy.setMimeType(getMimeType());
         copy.setDeletedByBroker(isDeletedByBroker());
         copy.setBlobUploader(getBlobUploader());
+        copy.setName(getName());
     }
 
     public byte getDataStructureType() {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobTest.java?rev=1041351&r1=1041350&r2=1041351&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/FTPBlobTest.java Thu
Dec  2 12:41:58 2010
@@ -50,6 +50,7 @@ public class FTPBlobTest extends FTPTest
         MessageProducer producer = session.createProducer(destination);
         MessageConsumer consumer = session.createConsumer(destination);
         BlobMessage message = session.createBlobMessage(file);
+        message.setName("fileName");
 
         producer.send(message);
         Thread.sleep(1000);
@@ -58,6 +59,7 @@ public class FTPBlobTest extends FTPTest
         Message msg = consumer.receive(1000);
         Assert.assertTrue(msg instanceof ActiveMQBlobMessage);
 
+        assertEquals("name is correct", "fileName", ((ActiveMQBlobMessage)msg).getName());
         InputStream input = ((ActiveMQBlobMessage) msg).getInputStream();
         StringBuilder b = new StringBuilder();
         int i = input.read();



Mime
View raw message