You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/02/26 01:12:00 UTC
[jira] [Commented] (ARTEMIS-2183)
RefsOperation::getDeliveringMessages is broken
[ https://issues.apache.org/jira/browse/ARTEMIS-2183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16777455#comment-16777455 ]
ASF subversion and git services commented on ARTEMIS-2183:
----------------------------------------------------------
Commit 9f6f36d0418cded74d2e9b0570726ccabafb2790 in activemq-artemis's branch refs/heads/master from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=9f6f36d ]
ARTEMIS-2183 Fixing RefsOperation on consumers and adding test
> RefsOperation::getDeliveringMessages is broken
> ----------------------------------------------
>
> Key: ARTEMIS-2183
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2183
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Reporter: Jiri Daněk
> Priority: Trivial
> Time Spent: 5h
> Remaining Estimate: 0h
>
> {code}
> @Override
> public synchronized List<MessageReference> getRelatedMessageReferences() {
> List<MessageReference> listRet = new LinkedList<>();
> listRet.addAll(listRet); // 🐟
> return listRet;
> }
> {code}
> https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RefsOperation.java#L184
> The method returns empty list, which may be wrong (looking at the method name). There is absolutely nothing gained by adding content of empty inst into itself, as in {{listRet.addAll(listRet)}}.
> Doing the addAll thing can be an error under ErrorProne compiler.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)