diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2009-04-11 02:02:46 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2009-04-11 02:02:46 +0000 |
| commit | c24ff1aefe694aa965c11307fb08c891ff829942 (patch) | |
| tree | 3afb46debd6f7eec50e7b41a774c7ca625589399 /qpid/java | |
| parent | f33ec5ddf16a350e67f3b1c184d856486a246da7 (diff) | |
| download | qpid-python-c24ff1aefe694aa965c11307fb08c891ff829942.tar.gz | |
QPID-1800: only create the new empty arraylist after checking for a previous enqueue list, as it often wont be required
merge from trunk r764113
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/0.5-release@764151 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java index 6af39e3d1b..9c8cad4240 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java @@ -68,13 +68,16 @@ public class BaseTransactionLog implements TransactionLog _logger.info("Recording Enqueue of (" + messageId + ") on queue:" + queues); } - //list to hold which new queues to enqueue the message on - ArrayList<AMQQueue> toEnqueueList = new ArrayList<AMQQueue>(); + //variable to hold which new queues to enqueue the message on + ArrayList<AMQQueue> toEnqueueList = null; List<AMQQueue> enqueuedList = _idToQueues.get(messageId); if (enqueuedList != null) { //There are previous enqueues for this messageId + //create new empty list to hold additions + toEnqueueList = new ArrayList<AMQQueue>(); + synchronized (enqueuedList) { for(AMQQueue queue : queues) |
