cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: ObjectModel exception
Date Wed, 26 Sep 2007 20:08:22 GMT
Leszek Gawron pisze:
> Grzegorz Kossakowski wrote:
>> Leszek Gawron pisze:
>> Yep. Contrary to the old OM handling the new one demands equals()
>> method properly implemented for
>> all objects put on OM.
>> Is it something bad?
> I have no idea :) why such requirement? 

Because stack implementation used to maintain local scopes uses some variation of ListArray
that uses equals() when remove() method is called. Just for efficiency I guess that real scope
be implemented and need for proper equals() implementation would be eliminated but I think
minor issue.

> Question is why is my entity
> Contractor equalized to javascript NativeObject?

Most probably because you are having some NativeObjects produced by flow put on OM. That's
enough to
obtain such effect. Anyway, it is valid to call equals() with object of different class passed
parameter. In such case, equals() should return false before trying to cast.


Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon

View raw message