directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Is (@override) equals() here missing?
Date Wed, 19 May 2010 19:31:25 GMT
On 5/19/10 9:11 PM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Can somebody explain, why this class [1] overrides hashCode() but not
> equals()?
>    

Well, @override is optional, and it's just a hint for the compiler, so 
it's pretty common that the developper forgot to add it.

I usually don't put an @override annotation to such metods (toString, 
hashcode, equals...) but it's probably not a good idea.

I would suggest that we ad it in any case.

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.nextury.com



Mime
View raw message