Improving performance of OrderedPendingList contains method

Thanks for David Sitsky for the patch
This commit is contained in:
Christopher L. Shannon 2015-11-28 13:25:53 -05:00
parent 2aa172f905
commit 673c2928a1
1 changed files with 1 additions and 5 deletions

View File

@ -162,11 +162,7 @@ public class OrderedPendingList implements PendingList {
@Override
public boolean contains(MessageReference message) {
if (message != null) {
for (PendingNode value : map.values()) {
if (value.getMessage().equals(message)) {
return true;
}
}
return this.map.containsKey(message.getMessageId());
}
return false;
}