Hi!

Dan OConnor wrote:
> I think we should simply ensure that equals and hashCode are
> implemented in a class derived from Object. I don't think we should
> try to test the functionality of these methods if they exist, as this
> second test has ample room for mistakes and little upside.

That would be a simpler test, yes.

> The code to do this could involve calling "getDeclaredMethod" on
> each class object in the inheritance tree until you reached Object
> (or found an appropriate method). You would travel up the
> inheritance heirarchy by using getSuperclass.

getMethod is preferred and easier since these two are public methods.

/Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to