river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon IJskes - QCG <si...@qcg.nl>
Subject Re: ServiceItem without hashCode/equals
Date Wed, 17 Oct 2012 15:00:42 GMT
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

View raw message