diff options
| author | Robert Gemmell <robbie@apache.org> | 2009-04-10 23:55:37 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2009-04-10 23:55:37 +0000 |
| commit | a02fe13ab7d9f7c8ff00bce601f94c3b410bd597 (patch) | |
| tree | c0d7e30d4cfd3cfdc2fc999a6d1fa7a5b35cd82e /java | |
| parent | 90b82a2c50737a19a393c681421ea69df1cdc096 (diff) | |
| download | qpid-python-a02fe13ab7d9f7c8ff00bce601f94c3b410bd597.tar.gz | |
QPID-1800: only create the new empty arraylist after checking for a previous enqueue list, as it often wont be required
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@764113 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java b/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java index 6af39e3d1b..9c8cad4240 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/transactionlog/BaseTransactionLog.java +++ b/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) |
