ensure we don't use a batchEntry for an element that's deleted

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@552845 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-07-03 14:06:38 +00:00
parent 25a252f348
commit 0b95f87db0
1 changed files with 3 additions and 3 deletions

View File

@ -66,11 +66,11 @@ public class TopicSubContainer {
while(entry!=null){
ConsumerMessageRef ref=(ConsumerMessageRef)listContainer.get(entry);
listContainer.remove(entry);
if(ref!=null&&ref.getMessageId().equals(id)){
result=ref;
if(listContainer!=null&&batchEntry!=null&&(listContainer.isEmpty()||batchEntry.equals(entry))){
reset();
}
if(ref!=null&&ref.getMessageId().equals(id)){
result=ref;
break;
}
entry=listContainer.getFirst();