directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff MAURY <jeffma...@jeffmaury.com>
Subject Re: Is (@override) equals() here missing?
Date Wed, 19 May 2010 19:43:54 GMT
Both or none should be implemented.
Please not that Eclipse 3.5 offers a wizard to implement both in a single
test: chose the fields involved and both functions will be implemented. And
round trip is also supported.

Regards
Jeff MAURY

On Wed, May 19, 2010 at 9:34 PM, Felix Knecht <felixk@apache.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sorry, I was not clear:
>
> The method equals() is missing wheras the method hashCode() is
> implemented. Either both should be implemented (overridden) or none.
>
> So again, is it on purpose that the overriding equals method is missing?
>
>
> > 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.
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.15 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkv0PTYACgkQ2lZVCB08qHHfXQCcDLFE6I1dhIo2TKqKeX+GSOmj
> cEEAoIPvvDv4MBitkvNXVy+7/4EZx7Q9
> =u1tc
> -----END PGP SIGNATURE-----
>



-- 
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.lastfm.fr/listen/user/jeffmaury/personal

Mime
View raw message