I've been looking at equals/hashcode following some warnings from FindBugs,
but not resolved the problems fully. Thought it would be useful to summarise
what I've found so far:
If a class over-rides equals(), it should also override hashCode(),
otherwise it cannot be used reliably in Collections
Yes, let's clean up! Have you tried removing those equals() methods?
BAZLEY, Sebastian wrote:
I've been looking at equals/hashcode following some warnings from FindBugs,
but not resolved the problems fully. Thought it would be useful to summarise
what I've found so far:
If a class over-rides
() or similar() method that would not
get used by Collections.
S.
-Original Message-
From: Jordi Salvat i Alabart [mailto:[EMAIL PROTECTED]
Sent: 20 February 2004 14:27
To: JMeter Developers List
Subject: Re: [HEADS UP] Possible problems with equals() and hashCode()
Yes, let's clean up! Have you
a sameAs() or similar() method
that would not
get used by Collections.
S.
-Original Message-
From: Jordi Salvat i Alabart [mailto:[EMAIL PROTECTED]
Sent: 20 February 2004 14:27
To: JMeter Developers List
Subject: Re: [HEADS UP] Possible problems with equals() and hashCode()
Yes, let's clean up