> Here is hashCode function (the same in UserPK and ResourceOwnerPK):
> public int hashCode() {
> if( _hashCode == Integer.MIN_VALUE )
> _hashCode += this.username.hashCode(); // line 59
> return _hashCode;
> }
this.username is null. Do you have this field in both classes, so you
have a shadowed field. By the way, this is a dangerous hash function as
when the pk is serialized the hashCode will be reset to 0 not
Integer.MIN_VALUE assuming it is marked a transient.
Also check that you implemented equals correctly. You must check for an
exact type match first.
-dain
--
xxxxxxxxxxxxxxxxxxxxxxxxx
Dain Sundstrom
Chief Architect, JBossCMP
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user