From dev-return-70144-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Mon Feb 25 17:42:31 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5B617180626 for ; Mon, 25 Feb 2019 18:42:31 +0100 (CET) Received: (qmail 39501 invoked by uid 500); 25 Feb 2019 17:42:30 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 39490 invoked by uid 99); 25 Feb 2019 17:42:30 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2019 17:42:30 +0000 From: GitBox To: dev@activemq.apache.org Subject: [GitHub] michaelandrepearce commented on a change in pull request #2564: ARTEMIS-2183 Useless statement in public synchronized List Message-ID: <155111654972.27430.11063018844769836649.gitbox@gitbox.apache.org> Date: Mon, 25 Feb 2019 17:42:29 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit michaelandrepearce commented on a change in pull request #2564: ARTEMIS-2183 Useless statement in public synchronized List URL: https://github.com/apache/activemq-artemis/pull/2564#discussion_r259939801 ########## File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RefsOperation.java ########## @@ -190,9 +190,7 @@ private void decrementRefCount(MessageReference refmsg) { @Override public synchronized List getRelatedMessageReferences() { - List listRet = new LinkedList<>(); Review comment: I think the point here is the code is addall of the list it just created. This seems very odd. Id agree an internal list should just be exposed. But the current logic just looks crazy wrong. Youd be better to return Collections.emptylist! ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services