Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 049C8E7CA for ; Fri, 15 Mar 2013 22:14:16 +0000 (UTC) Received: (qmail 90505 invoked by uid 500); 15 Mar 2013 22:14:15 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 90408 invoked by uid 500); 15 Mar 2013 22:14:15 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 90397 invoked by uid 99); 15 Mar 2013 22:14:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 22:14:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robbie.gemmell@gmail.com designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bk0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Mar 2013 22:14:10 +0000 Received: by mail-bk0-f52.google.com with SMTP id jk13so1716445bkc.39 for ; Fri, 15 Mar 2013 15:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=0eH9lpFQrjaBsUjGg3ZQbkECCbfb1Cugh51ZpeyenzY=; b=Wx95Fuc9u5ynNeD8ZE9B1m9uWUeiy2Ysa8Ss068YCGqBD6QbD77Ii3F2wAjriHrSae S5YT5z3NA+G7DN4PWofpEWPhKH80WxxRpnybRkhk6oDd7hCt2ADBUwRH6FMvKAEkaa/9 zGvhCEzXdwJZyM3ZKHq8TfeHwGLyl6nPqljTHVChtRaJ3qoBVgtl+OyQ9AqU9jpOzUxA oLvRiiQF+cVFjdjAUhu0Y/vRUXqL9lzxNUCwtdjwVOOz6iA1hoK13rskWV+ZnEg+Gz6u jzyvPTLa8IMPG7Qc4+YhjnwBqgQpquLm9Mp5pAI7o4jFhcdeneaPUwVMqPi16wAShq6W jBpQ== MIME-Version: 1.0 X-Received: by 10.204.201.1 with SMTP id ey1mr3804211bkb.84.1363385628706; Fri, 15 Mar 2013 15:13:48 -0700 (PDT) Received: by 10.205.97.5 with HTTP; Fri, 15 Mar 2013 15:13:48 -0700 (PDT) In-Reply-To: References: Date: Fri, 15 Mar 2013 22:13:48 +0000 Message-ID: Subject: Re: Comparing two JMS Destinations created using address strings. From: Robbie Gemmell To: "dev@qpid.apache.org" Cc: "users@qpid.apache.org" Content-Type: multipart/alternative; boundary=485b3970d5ce17831e04d7fdf44b X-Virus-Checked: Checked by ClamAV on apache.org --485b3970d5ce17831e04d7fdf44b Content-Type: text/plain; charset=ISO-8859-1 Personally I would probably go for option 2, though I see the existing comparison (presumably for the old BindingURLs) was already similarly lacking. At the very least I think the comment Alex made on the JIRA around the 'subject' from the Address string needs to be addressed. I seem to recall from reviewing a different change at some point, I noted that not specifying an exchange within an Address made it default to use of the amq.topic exchange somewhere under the covers. That suggests that after the change which has been made, for many users session.createTopic() could have unexpectedly started returning a lot of different Topic objects that always say they are equal when they are clearly not expected to be. Robbie On 11 March 2013 21:04, Rajith Attapattu wrote: > Hi All, > > While fixing QPID-3769, I came across this issue. > > There are two options for implementing the equals method (and hashcode). > > 1. Check the "type" and "name" to ensure they both point to the same > "destination" (which could be a queue or an exchange in pre 1.0 > terms). > > 2. Do a comprehensive check on the internal address data structure to > ensure that all fields, properties, options are the same. > > (Please note that comparing two address strings is not a good idea as > there can whitespaces). > > I prefer option one and have pasted the patch as a comment on the JIRA > > What do others think? > > Regards, > > Rajith > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org > For additional commands, e-mail: dev-help@qpid.apache.org > > --485b3970d5ce17831e04d7fdf44b--