Return-Path: X-Original-To: apmail-river-dev-archive@www.apache.org Delivered-To: apmail-river-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D4B91DB35 for ; Wed, 17 Oct 2012 15:01:13 +0000 (UTC) Received: (qmail 61660 invoked by uid 500); 17 Oct 2012 15:01:13 -0000 Delivered-To: apmail-river-dev-archive@river.apache.org Received: (qmail 61603 invoked by uid 500); 17 Oct 2012 15:01:13 -0000 Mailing-List: contact dev-help@river.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@river.apache.org Delivered-To: mailing list dev@river.apache.org Received: (qmail 61594 invoked by uid 99); 17 Oct 2012 15:01:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 15:01:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.148.84.61] (HELO srv6.qcg.nl) (217.148.84.61) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 15:01:05 +0000 Received: from nyx-tunnel ([10.99.200.1] helo=nyx.qcg.nl) by srv6.qcg.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1TOV6y-0003T2-Ld for dev@river.apache.org; Wed, 17 Oct 2012 17:00:44 +0200 Received: from ip-166.qcg.lan ([192.168.99.166]) by nyx.qcg.nl with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1TOV6y-0007ab-5J for dev@river.apache.org; Wed, 17 Oct 2012 17:00:44 +0200 Message-ID: <507EC81A.5000708@qcg.nl> Date: Wed, 17 Oct 2012 17:00:42 +0200 From: Simon IJskes - QCG User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: dev@river.apache.org Subject: Re: ServiceItem without hashCode/equals References: <507D5449.7000505@qcg.nl> <1350462695.2137.5.camel@Nokia-N900-51-1> In-Reply-To: <1350462695.2137.5.camel@Nokia-N900-51-1> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 17-10-12 10:31, Peter wrote: > Because the service registrar uses serialised form, not objects for comparison with ServiceTemplate. If one wants to create a dynamic overview of ServiceItems that are available, in a List, by attaching a ServiceDiscoveryListener to a lookupCache, and one wants to handle removals by List.remove(Object), these are processed in the List by equals(), you have to wrap ServiceItem in a wrapper to to care of the equals(), because the ServiceDiscoveryEvent is making copies. So are there reasons for not having an equals() on ServiceItem itself? A quick check does not reveal any use of equals() in river. Gr. SImon