Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 51175 invoked from network); 10 Nov 2005 08:52:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Nov 2005 08:52:35 -0000 Received: (qmail 21361 invoked by uid 500); 10 Nov 2005 08:52:33 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 21336 invoked by uid 500); 10 Nov 2005 08:52:33 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 21325 invoked by uid 99); 10 Nov 2005 08:52:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2005 00:52:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.175.229.106] (HELO mail.seitenbau.net) (194.175.229.106) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2005 00:52:26 -0800 Received: from [195.127.188.18] (helo=www.seitenbau.net) by router1.seitenbau.net with esmtp (Exim 4.43) id 1Ea8BU-00004k-5d for torque-dev@db.apache.org; Thu, 10 Nov 2005 09:53:28 +0100 In-Reply-To: <20051109235635.W15455@minotaur.apache.org> Subject: Re: TRQS321: Criteria Serialization To: "Apache Torque Developers List" X-Mailer: Lotus Notes Release 6.5 September 26, 2003 Message-ID: From: Thomas Fischer Date: Thu, 10 Nov 2005 09:52:06 +0100 X-MIMETrack: Serialize by Router on www/seitenbau(Release 6.5.1|January 21, 2004) at 10.11.2005 09:52:06 AM MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Scott, I did not see you already provided a patch in scarab. I will look at it= today evening. If noone objects, I will include it into the release. Thomas Thomas Fischer schrieb am 10.11.2005 09:19:06: > > > On Thu, 10 Nov 2005, Scott Eade wrote: > > > Thomas Fischer wrote: > > > >> I took a quick glance at the issue, and when I uncommented the tes= t case > >> you checked in and resolved an issue of visibility (use > >> "Criteria.getNewCriterion()" instead of "new Criteria.Criterion"),= the test > >> case did not produce an error. > >> > >> > > This is interesting. What JVM are you using? I am using J2SE 1.4.= 2_06 > > from Sun for Win32. > > I could reproduce the error at a second machine. It uses 1.4.2-05 for= > linux. > > > >> Then I looked what the test case does, and it uses Criteria.equals(Object) > >> to test whether the two criteria are equal. This is not enough, si= nce > >> Criteria.equals does not compare aliases and asColumns. There are = two > >> possibilities to remedy this: > >> - The first is to change criteria.equals, which I did not want to = do > >> between release candidates, but if somebody else is of another opi= nion > >> here, we need to discuss it. > >> > >> > > If equals() is performing its function correctly then this is IMO a= bug > > and most bugs warrant fixing - even between release candidates (tho= ugh > > preferably not between the last rc and the final release). > > ok, now that I can reproduce the error, I see that Criteria.equals() = is > not the problem (it is not strict enough in my opinion, but this has > nothing to do with the serialisation problem.) > > > ... > > As I said earlier, this has been broken (at least for me) for a whi= le, I > > wouldn't hold off 3.2 for this issue as nobody spoke up earlier or = felt > > that it was worth investing their own time to fix (me included). > > If we want to solve this problem, we can as easily fix it before the > release as after. So let's do it now, if we can. > > > According to Bloch (Effective Java Item 54) the default serialized = form > > of an inner class is ill-defined. This could lead to varying behav= iour > > between different JVMs. The answer may be to add custom serializat= ion > > code to Criterion. > > I could not get hold of Bloch's book in short time, but according to = what > I have found on the internet, the problem with inner classes only occ= urs > for non-static inner classes. So I thought maybe one can fix this by > making Criterion a static inner class (diff appended), but this does = not > solve the problem (same behaviour as before). > > I am puzzled at the moment and need to dissect the problem further to= > understand it. Not sure whether it will happen before the week-end, though > > Thomas[Anhang "patch.txt" gel=F6scht von Thomas > Fischer/kn/seitenbau] > ---------------------------------------------------------------------= > To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org > For additional commands, e-mail: torque-dev-help@db.apache.org= --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org