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 21:52:17 GMT
Leszek Gawron pisze:
> Grzegorz Kossakowski wrote:
>> Leszek Gawron pisze:
>> Because stack implementation used to maintain local scopes uses some
>> variation of ListArray class
>> that uses equals() when remove() method is called. Just for efficiency
>> I guess that real scope could
>> be implemented and need for proper equals() implementation would be
>> eliminated but I think it's
>> minor issue.
>> 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 as
>> parameter. In such case, equals() should return false before trying to
>> cast.
> Yeah I know that but why isn't the NativeObject unwrapped for comparison?

Because comparison is made by low-level class like ArrayList that is unaware of wrapping objects.

Do you want to say that NativeObjects should be unwrapped always whenever they are used in
Java code?

This can be done easily in o.a.c.components.flow.FlowHelper.setContextObject() but I must
be sure
that this will not introduce another problems.

Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon

View raw message