Could you please keep the posts on the list with the same subject? There are
people following the discussion.

Luis.

----- Original Message -----
From: "Cedric Beust" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 25, 2002 11:12 AM
Subject: Re: hashcode and equals method


> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]] On Behalf Of Enda
>
> > Exceptions are not thrown to be caught and hidden away from
> > console screens, they are there to tell you that somthing has
> > gone wrong.
>
> This is true in general but incorrect for equals().
>
> The contract of equals() is crystal clear:  if the objects are
> identical, return true, otherwise return false.
>
> If I compare an AddressPK with an EmployeePK, the result should be
> false.  Anything else, even an exception, is a breach in the contract of
> equals().
>
> --
> Cedric
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to