Follow-up patch to address the 2 comments in
https://git.opendaylight.org/gerrit/#/c/49384/ that were made
after merge..
Change-Id: Id9864d89637e72961fc1a259f25d541edb1b46dc
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
}
public Collection<ShardDataTreeCohort> getAndClearPendingTransactions() {
- Collection<ShardDataTreeCohort> ret = new ArrayList<>(pendingTransactions.size() + pendingCommits.size()
- + pendingFinishCommits.size());
+ Collection<ShardDataTreeCohort> ret = new ArrayList<>(getQueueSize());
for (CommitEntry entry: pendingFinishCommits) {
ret.add(entry.cohort);
return true;
} else {
- newTip = MoreObjects.firstNonNull(e.cohort.getCandidate(), dataTree);
+ newTip = MoreObjects.firstNonNull(e.cohort.getCandidate(), newTip);
}
}