From dev-return-69473-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Fri Jan 25 19:24:20 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 6B7FE180608 for ; Fri, 25 Jan 2019 19:24:20 +0100 (CET) Received: (qmail 77228 invoked by uid 500); 25 Jan 2019 18:24:19 -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 77217 invoked by uid 99); 25 Jan 2019 18:24:19 -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; Fri, 25 Jan 2019 18:24:19 +0000 From: GitBox To: dev@activemq.apache.org Subject: [GitHub] clebertsuconic commented on a change in pull request #2520: ARTEMIS-2238 Enhancement to queueQuery on producer Message-ID: <154844065862.18798.10633694796838176770.gitbox@gitbox.apache.org> Date: Fri, 25 Jan 2019 18:24:18 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit clebertsuconic commented on a change in pull request #2520: ARTEMIS-2238 Enhancement to queueQuery on producer URL: https://github.com/apache/activemq-artemis/pull/2520#discussion_r251086218 ########## File path: artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java ########## @@ -393,57 +395,18 @@ private void doSendx(ActiveMQDestination destination, if (defaultDestination == null) { throw new UnsupportedOperationException("Destination must be specified on send with an anonymous producer"); } - destination = defaultDestination; - } else { - if (defaultDestination != null) { - if (!destination.equals(defaultDestination)) { - throw new UnsupportedOperationException("Where a default destination is specified " + "for the sender and a destination is " + "specified in the arguments to the send, " + "these destinations must be equal"); - } + } else if (defaultDestination != null) { + if (!destination.equals(defaultDestination)) { + throw new UnsupportedOperationException("Where a default destination is specified " + "for the sender and a destination is " + "specified in the arguments to the send, " + "these destinations must be equal"); } + } else { + session.checkDestination(destination); address = destination.getSimpleAddress(); Review comment: Those lines are the reason why I wanted to run a full testsuite before merging this. And I think you're right... I'm adding a commit to be squashed into yours. I will squash it before merging it, but if you could review it please ---------------------------------------------------------------- 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