cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: ObjectModel exception
Date Thu, 27 Sep 2007 00:21:35 GMT
On 25.09.2007 15:48 Uhr, Grzegorz Kossakowski wrote:

> Yep. Contrary to the old OM handling the new one demands equals() method properly implemented
> all objects put on OM.

What does "properly" mean? I would not enforce the user to implement 
equals() on every object, so as long as default equals() implementation 
from Object works I'm ok with it.

But Leszek's implementation is not "properly" since it seems only to 
handle objects of the same type instead of any object. Usually an 
implementation for equals() looks like:

if (this == other) {
   return true;
if (!(other instance MyClassImplEquals)) {
   return false;
// now we can safely cast
MyClassImplEquals otherMyClass = (MyClassImplEquals)other;
// do the actual comparison


View raw message