Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 32041 invoked from network); 26 Sep 2007 21:52:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Sep 2007 21:52:39 -0000 Received: (qmail 81267 invoked by uid 500); 26 Sep 2007 21:52:28 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 81198 invoked by uid 500); 26 Sep 2007 21:52:27 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 81187 invoked by uid 99); 26 Sep 2007 21:52:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 14:52:27 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.86.168.179] (HELO mxout-04.mxes.net) (216.86.168.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2007 21:52:26 +0000 Received: from [192.168.0.125] (unknown [80.240.191.89]) by smtp.mxes.net (Postfix) with ESMTP id B71AEA3225 for ; Wed, 26 Sep 2007 17:52:05 -0400 (EDT) Message-ID: <46FAD491.3050004@apache.org> Date: Wed, 26 Sep 2007 23:52:17 +0200 From: Grzegorz Kossakowski User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: ObjectModel exception References: <46F7BED6.9010700@mobilebox.pl> <46F9662B.3060000@apache.org> <46FABAA0.2030804@mobilebox.pl> <46FABC36.3010209@apache.org> <46FAC7FF.6030005@mobilebox.pl> In-Reply-To: <46FAC7FF.6030005@mobilebox.pl> Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 http://reflectingonthevicissitudes.wordpress.com/