ARTEMIS-2183 Useless statement in public synchronized List

Ensures that the returned list returns the refsToAck list instead of
trying to add all items of itself

This closes 2566
This commit is contained in:
Otavio R. Piske 2019-02-25 19:53:41 +01:00 committed by Clebert Suconic
parent 0cf29fefc8
commit a1d10c02f9
1 changed files with 5 additions and 1 deletions

View File

@ -191,7 +191,11 @@ public class RefsOperation extends TransactionOperationAbstract {
@Override
public synchronized List<MessageReference> getRelatedMessageReferences() {
List<MessageReference> listRet = new LinkedList<>();
listRet.addAll(listRet);
if (refsToAck != null && !refsToAck.isEmpty()) {
listRet.addAll(refsToAck);
}
return listRet;
}