cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: ObjectModel exception
Date Thu, 27 Sep 2007 08:24:54 GMT
Grzegorz Kossakowski wrote:
> 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?

Seems natural to me. Otherwise anything put into object model from flow 
would be a native object - would you like to work with these in your 
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.
> 


-- 
Leszek Gawron                         http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.


Mime
View raw message