Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 30356 invoked from network); 9 Mar 2011 15:25:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Mar 2011 15:25:51 -0000 Received: (qmail 46335 invoked by uid 500); 9 Mar 2011 15:25:51 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 46247 invoked by uid 500); 9 Mar 2011 15:25:51 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 46238 invoked by uid 99); 9 Mar 2011 15:25:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2011 15:25:51 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [193.74.71.27] (HELO eir.is.scarlet.be) (193.74.71.27) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2011 15:25:44 +0000 Received: from mail.harfang.homelinux.org (ip-62-235-218-93.dsl.scarlet.be [62.235.218.93]) by eir.is.scarlet.be (8.14.2/8.14.2) with ESMTP id p29FPMh8028162 for ; Wed, 9 Mar 2011 16:25:22 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1299684322; bh=lOOYrkAWjgFCqnkaC4Cv0XVe2ED0GW2SAqWpPZx3DCc=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=iqqgv1SVxUZ7H3e35MhePfqu+GYtHQa/QcoNNvTiMJf443zwpqNcvbJO4igSeGjhi J3ZJrVMiR8l/afDZUaCae8BZJYBJxm6f3vjJjQjb2yC/sY/dSqWoo92NYqWeX1VhyN 0yHYlpngSDiSc82ikRDUM2N9tKzzO6ZxZRc5VBnA= Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 1980661790 for ; Wed, 9 Mar 2011 16:25:22 +0100 (CET) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id h9gVJxswOQg9 for ; Wed, 9 Mar 2011 16:25:16 +0100 (CET) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 7216161774 for ; Wed, 9 Mar 2011 16:25:16 +0100 (CET) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.72) (envelope-from ) id 1PxLGG-00037e-8T for dev@commons.apache.org; Wed, 09 Mar 2011 16:25:16 +0100 Date: Wed, 9 Mar 2011 16:25:15 +0100 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: [math] Re: svn commit: r1078734 Message-ID: <20110309152515.GS22814@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <20110307103754.1331923889EB@eris.apache.org> <4D768EE6.6050707@free.fr> <4D773ED3.1020607@free.fr> <20110309125903.GR22814@dusk.harfang.homelinux.org> <4D7787E7.4070307@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4D7787E7.4070307@free.fr> X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.20 (2009-06-14) X-DCC-scarlet.be-Metrics: eir 20002; Body=1 Fuz1=1 Fuz2=1 On Wed, Mar 09, 2011 at 03:00:07PM +0100, Luc Maisonobe wrote: > Le 09/03/2011 13:59, Gilles Sadowski a �crit : > > Hi. > > > >>>> [...] > >>>> > >>>> Or make the fields transient? > >>>> > >>>> That would perhaps cause problems if the Exceptions were ever > >>>> serialised, but can that happen? > >>> > >>> Yes, it's a typical JEE scenario and I cannot say how often I cursed Sun for > >>> stuffing an unserializable object into NamingException.setResolvedObject > >>> within their LDAP implementation ... > >>> > >>> Actually the MathRE should contain a writeObject implementation that > >>> replaces any non-serializable object in that array with some kind of > >>> replacement (e.g. with its String representation). Otherwise the MathRE will > >>> not reach its destination and all the localization was for nothing. > >> > >> That's a good idea. We could even do that replacement directly at > >> construction and never store the Object themselves, regardless of their > >> status with respect to serialization. > > > > Do you mean storing only the String representation of the arguments? > > Wouldn't that defeat the purpose of the map feature (which was to allow any > > kind of objects to be stored and retrieved)? > > You are right, I am stupid. So we have to check for serializable. I don't see why: The serialization will work provided all "Object" arguments are "Serializable"; it is the user's code responsibility to not try serializing the exception when it knows that it contains a non-serializable object. If the exceptions generated from CM contain only serializable objects (which is the case now), then we've done our part. Best, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org