activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [activemq-artemis] 01/03: ARTEMIS-2183 Useless statement in public synchronized List
Date Tue, 26 Feb 2019 01:11:13 GMT
This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit a1d10c02f99c00527b48e0d17ab8ee5766319999
Author: Otavio R. Piske <angusyoung@gmail.com>
AuthorDate: Mon Feb 25 19:53:41 2019 +0100

    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
---
 .../org/apache/activemq/artemis/core/server/impl/RefsOperation.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RefsOperation.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RefsOperation.java
index 3d8bdd6..6d21be2 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RefsOperation.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RefsOperation.java
@@ -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;
    }
 


Mime
View raw message