fix mbean test failure - get values in the right order from the pending list

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1424435 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2012-12-20 12:44:59 +00:00
parent 87871346c2
commit fb5a97276b
1 changed files with 3 additions and 2 deletions

View File

@ -149,8 +149,9 @@ public class OrderedPendingList implements PendingList {
@Override
public Collection<MessageReference> values() {
List<MessageReference> messageReferences = new ArrayList<MessageReference>();
for(PendingNode pendingNode : map.values()) {
messageReferences.add(pendingNode.getMessage());
Iterator<MessageReference> iterator = iterator();
while (iterator.hasNext()) {
messageReferences.add(iterator.next());
}
return messageReferences;
}