Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 51366 invoked from network); 25 May 2009 06:48:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 May 2009 06:48:44 -0000 Received: (qmail 72613 invoked by uid 500); 25 May 2009 06:48:56 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 72477 invoked by uid 500); 25 May 2009 06:48:55 -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 72467 invoked by uid 99); 25 May 2009 06:48:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 06:48:55 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.217.211 as permitted sender) Received: from [209.85.217.211] (HELO mail-gx0-f211.google.com) (209.85.217.211) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 May 2009 06:48:47 +0000 Received: by gxk7 with SMTP id 7so2716572gxk.18 for ; Sun, 24 May 2009 23:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=/ESU/ZsifGOUhjsXEwK736683Zq9XhH2i3N7V93kdSs=; b=gDDVpRKm187AJsrxzsdhndWJ/xEKdTUTjlMg3lGdymQsAgUbMTIbJWI/G3YztxL7qf McnQKKMMLGSt6iyM0EpvncT7r8c4RnAWZeODiD+eBs5s7OW/zQlb94QR99eViVQwMARp knx9BUOpLzd143Zywp3fBFPI2Gaf2bsg7lIEs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=Q/N04pKOcGopFtg+Dy/6NpB/nIGmDYmTiYDWEoJR2Nm1+TOoXS7Oit4RVp3OiW1A+7 cOYJGVKZod55rxJSq6hdVjrvAiqlWqg4yPc/PM47Tb7jjRbB3HQb1eDReDEsRTllOihv at2IdRbnC6jOrltgBM/2NnYmC8zuSMVzdXWGE= MIME-Version: 1.0 Received: by 10.150.215.2 with SMTP id n2mr13639147ybg.34.1243234051066; Sun, 24 May 2009 23:47:31 -0700 (PDT) In-Reply-To: <000901c9dcd5$a67378e0$4c5f6847@oemcomputer> References: <23537813.post@talk.nabble.com> <00f201c9d9b7$076b39c0$f17ae560@oemcomputer> <23650705.post@talk.nabble.com> <01cb01c9da8c$4cbea950$f17ae560@oemcomputer> <4A166174.904@free.fr> <4A167D05.4080900@gmail.com> <4A168A5C.1040806@free.fr> <026b01c9db75$f57a9d80$f17ae560@oemcomputer> <000901c9dcd5$a67378e0$4c5f6847@oemcomputer> From: Ted Dunning Date: Sun, 24 May 2009 23:47:11 -0700 Message-ID: Subject: Re: [math] Serialization To: Commons Developers List Content-Type: multipart/alternative; boundary=000e0cd59b42fc8a89046ab6fb83 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd59b42fc8a89046ab6fb83 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Bill, Did you commit those changes? I ask because I see similar issues with abstract and static classes. Gamma is an example of the static class issue. This class has only static methods, but it is marked as serializable (why?). ContinuedFraction is a good example of an abstract class that is marked as serializable. This latter case leads to code that is either strange or incorrect. The strange version has a version identifier even on anonymous classes as in this code here: // create continued fraction ContinuedFraction cf = new ContinuedFraction() { private static final long serialVersionUID = 5378525034886164398L; @Override protected double getA(int n, double x) { return ((2.0 * n) + 1.0) - a + x; } @Override protected double getB(int n, double x) { return n * (a - n); } }; ret = 1.0 / cf.evaluate(x, epsilon, maxIterations); ret = Math.exp(-x + (a * Math.log(x)) - logGamma(a)) * ret; If the serialVersionUID is ommitted, the anonymous class would be incorrectly serialized because it would inherit it's parent UID (I think). More importantly, I can't imagine why an abstract class like ContinuedFraction should be serializable. On Sun, May 24, 2009 at 6:10 PM, Bill Barker wrote: > Ok, most of the rest look like transient classes (e.g. all of > linear.decomposition). So asking for what needs to be Serialized, and what > doesn't. > -- Ted Dunning, CTO DeepDyve --000e0cd59b42fc8a89046ab6fb83--