qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r628733 - /incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
Date Mon, 18 Feb 2008 13:38:56 GMT
Author: aidan
Date: Mon Feb 18 05:38:36 2008
New Revision: 628733

URL: http://svn.apache.org/viewvc?rev=628733&view=rev
Log:
fix dumb NPE

Modified:
    incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java

Modified: incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java?rev=628733&r1=628732&r2=628733&view=diff
==============================================================================
--- incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
(original)
+++ incubator/qpid/branches/thegreatmerge/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
Mon Feb 18 05:38:36 2008
@@ -263,7 +263,11 @@
                               
         ContentHeaderBody contentHeaderBody = new ContentHeaderBody();
         contentHeaderBody.bodySize = MESSAGE_SIZE;   // in bytes
-	((BasicContentHeaderProperties) contentHeaderBody.properties).setDeliveryMode((byte) (persistent
? 2 : 1));
+        if (contentHeaderBody.properties == null)
+        {
+        	contentHeaderBody.properties = new BasicContentHeaderProperties();
+        }
+        ((BasicContentHeaderProperties) contentHeaderBody.properties).setDeliveryMode((byte)
(persistent ? 2 : 1));
         return new AMQMessage(_messageStore.getNewMessageId(), publish, _transactionalContext,
contentHeaderBody);
     }
 



Mime
View raw message